\frac{\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}\begin{array}{l}
\mathbf{if}\;b_2 \le -6.2236891540374195 \cdot 10^{86}:\\
\;\;\;\;\frac{-1}{2} \cdot \frac{c}{b_2}\\
\mathbf{elif}\;b_2 \le 4.8057167673180601 \cdot 10^{-168}:\\
\;\;\;\;\frac{1}{\sqrt{b_2 \cdot b_2 - a \cdot c} - b_2} \cdot c\\
\mathbf{elif}\;b_2 \le 4.0752930910960833 \cdot 10^{107}:\\
\;\;\;\;\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 VAR;
if ((b_2 <= -6.22368915403742e+86)) {
VAR = (-0.5 * (c / b_2));
} else {
double VAR_1;
if ((b_2 <= 4.80571676731806e-168)) {
VAR_1 = ((1.0 / (sqrt(((b_2 * b_2) - (a * c))) - b_2)) * c);
} else {
double VAR_2;
if ((b_2 <= 4.075293091096083e+107)) {
VAR_2 = ((-b_2 - sqrt(((b_2 * b_2) - (a * c)))) * (1.0 / a));
} else {
VAR_2 = ((0.5 * (c / b_2)) - (2.0 * (b_2 / a)));
}
VAR_1 = VAR_2;
}
VAR = VAR_1;
}
return VAR;
}



Bits error versus a



Bits error versus b_2



Bits error versus c
Results
if b_2 < -6.22368915403742e+86Initial program 58.5
Taylor expanded around -inf 2.3
if -6.22368915403742e+86 < b_2 < 4.80571676731806e-168Initial program 27.9
rmApplied flip--28.1
Simplified17.1
Simplified17.1
rmApplied *-un-lft-identity17.1
Applied associate-/r*17.1
Simplified15.3
rmApplied clear-num15.3
Simplified11.0
rmApplied div-inv11.1
Applied add-cube-cbrt11.1
Applied times-frac10.9
Simplified10.9
Simplified10.8
if 4.80571676731806e-168 < b_2 < 4.075293091096083e+107Initial program 6.5
rmApplied div-inv6.7
if 4.075293091096083e+107 < b_2 Initial program 47.5
Taylor expanded around inf 4.1
Final simplification6.8
herbie shell --seed 2020075
(FPCore (a b_2 c)
:name "NMSE problem 3.2.1"
:precision binary64
(/ (- (- b_2) (sqrt (- (* b_2 b_2) (* a c)))) a))