\frac{\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}\begin{array}{l}
\mathbf{if}\;b_2 \le -2.9189091313663101 \cdot 10^{-83}:\\
\;\;\;\;\frac{-1}{2} \cdot \frac{c}{b_2}\\
\mathbf{elif}\;b_2 \le 7.0423614716856544 \cdot 10^{82}:\\
\;\;\;\;\left(\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - a \cdot c}\right) \cdot \frac{1}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{2} \cdot \frac{c}{b_2} - 2 \cdot \frac{b_2}{a}\\
\end{array}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 VAR;
if ((b_2 <= -2.91890913136631e-83)) {
VAR = (-0.5 * (c / b_2));
} else {
double VAR_1;
if ((b_2 <= 7.042361471685654e+82)) {
VAR_1 = ((-b_2 - sqrt(((b_2 * b_2) - (a * c)))) * (1.0 / a));
} else {
VAR_1 = ((0.5 * (c / b_2)) - (2.0 * (b_2 / a)));
}
VAR = VAR_1;
}
return VAR;
}



Bits error versus a



Bits error versus b_2



Bits error versus c
Results
if b_2 < -2.91890913136631e-83Initial program 51.8
Taylor expanded around -inf 10.4
if -2.91890913136631e-83 < b_2 < 7.042361471685654e+82Initial program 12.7
rmApplied div-inv12.8
if 7.042361471685654e+82 < b_2 Initial program 41.9
Taylor expanded around inf 4.3
Final simplification10.4
herbie shell --seed 2020079 +o rules:numerics
(FPCore (a b_2 c)
:name "quad2m (problem 3.2.1, negative)"
:precision binary64
(/ (- (- b_2) (sqrt (- (* b_2 b_2) (* a c)))) a))