\frac{\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}\begin{array}{l}
\mathbf{if}\;b_2 \le -1.45334315236151028 \cdot 10^{-64}:\\
\;\;\;\;\frac{-1}{2} \cdot \frac{c}{b_2}\\
\mathbf{elif}\;b_2 \le 7.516025817305246 \cdot 10^{102}:\\
\;\;\;\;\frac{\left(-b_2\right) - \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.4533431523615103e-64)) {
VAR = (-0.5 * (c / b_2));
} else {
double VAR_1;
if ((b_2 <= 7.516025817305246e+102)) {
VAR_1 = ((-b_2 - 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.4533431523615103e-64Initial program 53.1
Taylor expanded around -inf 8.7
if -1.4533431523615103e-64 < b_2 < 7.516025817305246e+102Initial program 13.2
rmApplied div-inv13.3
rmApplied un-div-inv13.2
if 7.516025817305246e+102 < b_2 Initial program 47.6
Taylor expanded around inf 3.5
Final simplification10.0
herbie shell --seed 2020078 +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))