\frac{\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}\begin{array}{l}
\mathbf{if}\;b_2 \le -1.3295118613703302 \cdot 10^{-13}:\\
\;\;\;\;\frac{-1}{2} \cdot \frac{c}{b_2}\\
\mathbf{elif}\;b_2 \le 3.29545095081340793 \cdot 10^{65}:\\
\;\;\;\;\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 temp;
if ((b_2 <= -1.3295118613703302e-13)) {
temp = (-0.5 * (c / b_2));
} else {
double temp_1;
if ((b_2 <= 3.295450950813408e+65)) {
temp_1 = ((-b_2 - sqrt(((b_2 * b_2) - (a * c)))) * (1.0 / a));
} else {
temp_1 = ((0.5 * (c / b_2)) - (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 < -1.3295118613703302e-13Initial program 55.0
Taylor expanded around -inf 6.9
if -1.3295118613703302e-13 < b_2 < 3.295450950813408e+65Initial program 15.4
rmApplied div-inv15.5
if 3.295450950813408e+65 < b_2 Initial program 40.0
Taylor expanded around inf 4.7
Final simplification10.5
herbie shell --seed 2020057 +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))