\frac{\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}\begin{array}{l}
\mathbf{if}\;b_2 \leq -1.1144738873289328 \cdot 10^{+144}:\\
\;\;\;\;-0.5 \cdot \frac{c}{b_2}\\
\mathbf{elif}\;b_2 \leq 1.2852416291713516 \cdot 10^{-256}:\\
\;\;\;\;\frac{c}{\sqrt{b_2 \cdot b_2 - c \cdot a} - b_2}\\
\mathbf{elif}\;b_2 \leq 1028948765099707.4:\\
\;\;\;\;\frac{-b_2}{a} - \frac{\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 -1.1144738873289328e+144)
(* -0.5 (/ c b_2))
(if (<= b_2 1.2852416291713516e-256)
(/ c (- (sqrt (- (* b_2 b_2) (* c a))) b_2))
(if (<= b_2 1028948765099707.4)
(- (/ (- b_2) a) (/ (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 (((double) (((double) -(b_2)) - ((double) sqrt(((double) (((double) (b_2 * b_2)) - ((double) (a * c)))))))) / a);
}
double code(double a, double b_2, double c) {
double tmp;
if ((b_2 <= -1.1144738873289328e+144)) {
tmp = ((double) (-0.5 * (c / b_2)));
} else {
double tmp_1;
if ((b_2 <= 1.2852416291713516e-256)) {
tmp_1 = (c / ((double) (((double) sqrt(((double) (((double) (b_2 * b_2)) - ((double) (c * a)))))) - b_2)));
} else {
double tmp_2;
if ((b_2 <= 1028948765099707.4)) {
tmp_2 = ((double) ((((double) -(b_2)) / a) - (((double) sqrt(((double) (((double) (b_2 * b_2)) - ((double) (c * a)))))) / a)));
} else {
tmp_2 = ((double) (((double) ((c / b_2) * 0.5)) - ((double) (2.0 * (b_2 / a)))));
}
tmp_1 = tmp_2;
}
tmp = tmp_1;
}
return tmp;
}



Bits error versus a



Bits error versus b_2



Bits error versus c
Results
if b_2 < -1.1144738873289328e144Initial program 62.9
Taylor expanded around -inf 2.3
if -1.1144738873289328e144 < b_2 < 1.2852416291713516e-256Initial program 33.2
rmApplied clear-num_binary6433.3
rmApplied flip--_binary6433.3
Applied associate-/r/_binary6433.3
Applied associate-/r*_binary6433.3
Simplified14.5
Taylor expanded around 0 8.6
if 1.2852416291713516e-256 < b_2 < 1028948765099707.38Initial program 9.4
rmApplied div-sub_binary649.4
if 1028948765099707.38 < b_2 Initial program 32.5
Taylor expanded around inf 6.4
Final simplification7.1
herbie shell --seed 2020205
(FPCore (a b_2 c)
:name "quad2m (problem 3.2.1, negative)"
:precision binary64
(/ (- (- b_2) (sqrt (- (* b_2 b_2) (* a c)))) a))