\frac{\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}\begin{array}{l}
\mathbf{if}\;b_2 \le -3.41594632970721297 \cdot 10^{54}:\\
\;\;\;\;\frac{-1}{2} \cdot \frac{c}{b_2}\\
\mathbf{elif}\;b_2 \le 4.300666801536262 \cdot 10^{-42}:\\
\;\;\;\;\frac{\frac{a}{\frac{\sqrt{b_2 \cdot b_2 - a \cdot c} - b_2}{c}}}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{-2 \cdot 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 <= -3.415946329707213e+54)) {
temp = (-0.5 * (c / b_2));
} else {
double temp_1;
if ((b_2 <= 4.300666801536262e-42)) {
temp_1 = ((a / ((sqrt(((b_2 * b_2) - (a * c))) - b_2) / 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 < -3.415946329707213e+54Initial program 57.3
Taylor expanded around -inf 3.9
if -3.415946329707213e+54 < b_2 < 4.300666801536262e-42Initial program 22.2
rmApplied flip--26.7
Simplified19.3
Simplified19.3
rmApplied *-un-lft-identity19.3
Applied associate-/r*19.3
Simplified17.5
if 4.300666801536262e-42 < b_2 Initial program 28.8
rmApplied flip--58.5
Simplified58.1
Simplified58.1
Taylor expanded around 0 8.6
Final simplification11.2
herbie shell --seed 2020053
(FPCore (a b_2 c)
:name "NMSE problem 3.2.1"
:precision binary64
(/ (- (- b_2) (sqrt (- (* b_2 b_2) (* a c)))) a))