\frac{\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}\begin{array}{l}
\mathbf{if}\;b_2 \leq -2.989405411627715 \cdot 10^{+151}:\\
\;\;\;\;-0.5 \cdot \frac{c}{b_2}\\
\mathbf{elif}\;b_2 \leq 7.763327155508912 \cdot 10^{-220}:\\
\;\;\;\;\frac{c}{\sqrt{b_2 \cdot b_2 - c \cdot a} - b_2}\\
\mathbf{elif}\;b_2 \leq 1.4967152907647445 \cdot 10^{+97}:\\
\;\;\;\;\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 - 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 -2.989405411627715e+151)
(* -0.5 (/ c b_2))
(if (<= b_2 7.763327155508912e-220)
(/ c (- (sqrt (- (* b_2 b_2) (* c a))) b_2))
(if (<= b_2 1.4967152907647445e+97)
(* (+ b_2 (sqrt (- (* b_2 b_2) (* c a)))) (/ -1.0 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 <= -2.989405411627715e+151)) {
tmp = ((double) (-0.5 * (c / b_2)));
} else {
double tmp_1;
if ((b_2 <= 7.763327155508912e-220)) {
tmp_1 = (c / ((double) (((double) sqrt(((double) (((double) (b_2 * b_2)) - ((double) (c * a)))))) - b_2)));
} else {
double tmp_2;
if ((b_2 <= 1.4967152907647445e+97)) {
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) (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 < -2.9894054116277152e151Initial program 63.6
Taylor expanded around -inf 1.2
if -2.9894054116277152e151 < b_2 < 7.76332715550891179e-220Initial program 31.6
rmApplied flip--_binary6431.7
Simplified15.8
Simplified15.8
rmApplied *-un-lft-identity_binary6415.8
Applied *-un-lft-identity_binary6415.8
Applied times-frac_binary6415.8
Simplified15.8
Simplified9.2
if 7.76332715550891179e-220 < b_2 < 1.4967152907647445e97Initial program 7.8
rmApplied div-inv_binary648.0
if 1.4967152907647445e97 < b_2 Initial program 46.6
Taylor expanded around inf 3.9
Final simplification6.6
herbie shell --seed 2020210
(FPCore (a b_2 c)
:name "quad2m (problem 3.2.1, negative)"
:precision binary64
(/ (- (- b_2) (sqrt (- (* b_2 b_2) (* a c)))) a))