\frac{\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}\begin{array}{l}
\mathbf{if}\;b_2 \le -8.48011838473109798 \cdot 10^{-73}:\\
\;\;\;\;\frac{-1}{2} \cdot \frac{c}{b_2}\\
\mathbf{elif}\;b_2 \le 2.12330831537073 \cdot 10^{121}:\\
\;\;\;\;\frac{\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}\\
\mathbf{else}:\\
\;\;\;\;-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 temp;
if ((b_2 <= -8.480118384731098e-73)) {
temp = (-0.5 * (c / b_2));
} else {
double temp_1;
if ((b_2 <= 2.12330831537073e+121)) {
temp_1 = ((-b_2 - sqrt(((b_2 * b_2) - (a * c)))) / a);
} else {
temp_1 = (-2.0 * (b_2 / a));
}
temp = temp_1;
}
return temp;
}



Bits error versus a



Bits error versus b_2



Bits error versus c
Results
if b_2 < -8.480118384731098e-73Initial program 53.4
Taylor expanded around -inf 8.5
if -8.480118384731098e-73 < b_2 < 2.12330831537073e+121Initial program 12.8
rmApplied clear-num13.0
rmApplied clear-num12.9
Applied remove-double-div12.8
if 2.12330831537073e+121 < b_2 Initial program 52.3
rmApplied clear-num52.3
Taylor expanded around 0 2.3
Final simplification9.8
herbie shell --seed 2020066 +o rules:numerics
(FPCore (a b_2 c)
:name "NMSE problem 3.2.1"
:precision binary64
(/ (- (- b_2) (sqrt (- (* b_2 b_2) (* a c)))) a))