\frac{\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}\begin{array}{l}
\mathbf{if}\;b_2 \leq -5.882030433389928 \cdot 10^{+125}:\\
\;\;\;\;-0.5 \cdot \frac{c}{b_2}\\
\mathbf{elif}\;b_2 \leq -3.9422997567625006 \cdot 10^{-287}:\\
\;\;\;\;\frac{c}{\sqrt{b_2 \cdot b_2 - c \cdot a} - b_2}\\
\mathbf{elif}\;b_2 \leq 8.146902378104984 \cdot 10^{+55}:\\
\;\;\;\;\left(b_2 + \sqrt{b_2 \cdot b_2 - c \cdot a}\right) \cdot \frac{-1}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{b_2} \cdot 0.5 + \frac{b_2}{a} \cdot -2\\
\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 -5.882030433389928e+125)
(* -0.5 (/ c b_2))
(if (<= b_2 -3.9422997567625006e-287)
(/ c (- (sqrt (- (* b_2 b_2) (* c a))) b_2))
(if (<= b_2 8.146902378104984e+55)
(* (+ b_2 (sqrt (- (* b_2 b_2) (* c a)))) (/ -1.0 a))
(+ (* (/ c b_2) 0.5) (* (/ b_2 a) -2.0))))))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 <= -5.882030433389928e+125)) {
tmp = ((double) (-0.5 * (c / b_2)));
} else {
double tmp_1;
if ((b_2 <= -3.9422997567625006e-287)) {
tmp_1 = (c / ((double) (((double) sqrt(((double) (((double) (b_2 * b_2)) - ((double) (c * a)))))) - b_2)));
} else {
double tmp_2;
if ((b_2 <= 8.146902378104984e+55)) {
tmp_2 = ((double) (((double) (b_2 + ((double) sqrt(((double) (((double) (b_2 * b_2)) - ((double) (c * a)))))))) * (-1.0 / a)));
} else {
tmp_2 = ((double) (((double) ((c / b_2) * 0.5)) + ((double) ((b_2 / a) * -2.0))));
}
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 < -5.882030433389928e125Initial program Error: 61.8 bits
Taylor expanded around -inf Error: 2.1 bits
if -5.882030433389928e125 < b_2 < -3.9422997567625006e-287Initial program Error: 35.2 bits
rmApplied flip--Error: 35.2 bits
SimplifiedError: 16.6 bits
SimplifiedError: 16.6 bits
rmApplied *-un-lft-identityError: 16.6 bits
Applied *-un-lft-identityError: 16.6 bits
Applied times-fracError: 16.6 bits
SimplifiedError: 16.6 bits
SimplifiedError: 7.9 bits
if -3.9422997567625006e-287 < b_2 < 8.14690237810498375e55Initial program Error: 10.0 bits
rmApplied div-invError: 10.1 bits
if 8.14690237810498375e55 < b_2 Initial program Error: 39.4 bits
Taylor expanded around inf Error: 5.4 bits
SimplifiedError: 5.4 bits
Final simplificationError: 6.8 bits
herbie shell --seed 2020204
(FPCore (a b_2 c)
:name "quad2m (problem 3.2.1, negative)"
:precision binary64
(/ (- (- b_2) (sqrt (- (* b_2 b_2) (* a c)))) a))