\frac{\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}\begin{array}{l}
\mathbf{if}\;b_2 \le -1.20290851787363389 \cdot 10^{-108}:\\
\;\;\;\;\frac{-1}{2} \cdot \frac{c}{b_2}\\
\mathbf{elif}\;b_2 \le 3.7662531131329464 \cdot 10^{74}:\\
\;\;\;\;\frac{-b_2}{a} - \frac{\sqrt{b_2 \cdot b_2 - a \cdot c}}{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 <= -1.2029085178736339e-108)) {
VAR = (-0.5 * (c / b_2));
} else {
double VAR_1;
if ((b_2 <= 3.7662531131329464e+74)) {
VAR_1 = ((-b_2 / a) - (sqrt(((b_2 * b_2) - (a * c))) / 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 < -1.2029085178736339e-108Initial program 51.7
Taylor expanded around -inf 10.3
if -1.2029085178736339e-108 < b_2 < 3.7662531131329464e+74Initial program 12.0
rmApplied div-sub12.0
if 3.7662531131329464e+74 < b_2 Initial program 40.9
Taylor expanded around inf 4.9
Final simplification10.0
herbie shell --seed 2020091
(FPCore (a b_2 c)
:name "quad2m (problem 3.2.1, negative)"
:precision binary64
(/ (- (- b_2) (sqrt (- (* b_2 b_2) (* a c)))) a))