\frac{\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}\begin{array}{l}
\mathbf{if}\;b_2 \leq -3.7135256748667976 \cdot 10^{+88}:\\
\;\;\;\;-0.5 \cdot \frac{c}{b_2}\\
\mathbf{elif}\;b_2 \leq 9.324610657040199 \cdot 10^{-256}:\\
\;\;\;\;\frac{c}{\sqrt{b_2 \cdot b_2 - c \cdot a} - b_2}\\
\mathbf{elif}\;b_2 \leq 3.365943335282884 \cdot 10^{+73}:\\
\;\;\;\;\frac{\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - c \cdot a}}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{b_2} \cdot 0.5 - 2 \cdot \frac{b_2}{a}\\
\end{array}(FPCore (a b_2 c) :precision binary64 (/ (- (- b_2) (sqrt (- (* b_2 b_2) (* a c)))) a))
(FPCore (a b_2 c)
:precision binary64
(if (<= b_2 -3.7135256748667976e+88)
(* -0.5 (/ c b_2))
(if (<= b_2 9.324610657040199e-256)
(/ c (- (sqrt (- (* b_2 b_2) (* c a))) b_2))
(if (<= b_2 3.365943335282884e+73)
(/ (- (- b_2) (sqrt (- (* b_2 b_2) (* c a)))) a)
(- (* (/ c b_2) 0.5) (* 2.0 (/ b_2 a)))))))double code(double a, double b_2, double c) {
return (-b_2 - sqrt((b_2 * b_2) - (a * c))) / a;
}
double code(double a, double b_2, double c) {
double tmp;
if (b_2 <= -3.7135256748667976e+88) {
tmp = -0.5 * (c / b_2);
} else if (b_2 <= 9.324610657040199e-256) {
tmp = c / (sqrt((b_2 * b_2) - (c * a)) - b_2);
} else if (b_2 <= 3.365943335282884e+73) {
tmp = (-b_2 - sqrt((b_2 * b_2) - (c * a))) / a;
} else {
tmp = ((c / b_2) * 0.5) - (2.0 * (b_2 / a));
}
return tmp;
}



Bits error versus a



Bits error versus b_2



Bits error versus c
Results
if b_2 < -3.71352567486679761e88Initial program 58.7
Taylor expanded around -inf 2.8
if -3.71352567486679761e88 < b_2 < 9.32461065704019899e-256Initial program 30.2
rmApplied clear-num_binary6430.2
rmApplied flip--_binary6430.3
Applied associate-/r/_binary6430.3
Applied associate-/r*_binary6430.3
Simplified16.0
Taylor expanded around 0 9.6
if 9.32461065704019899e-256 < b_2 < 3.3659433352828838e73Initial program 8.1
if 3.3659433352828838e73 < b_2 Initial program 40.5
Taylor expanded around inf 4.9
Final simplification6.7
herbie shell --seed 2020233
(FPCore (a b_2 c)
:name "quad2m (problem 3.2.1, negative)"
:precision binary64
(/ (- (- b_2) (sqrt (- (* b_2 b_2) (* a c)))) a))