\frac{\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}\begin{array}{l}
\mathbf{if}\;b_2 \le -1.19915098118719145 \cdot 10^{121}:\\
\;\;\;\;\frac{-1}{2} \cdot \frac{c}{b_2}\\
\mathbf{elif}\;b_2 \le -3.4150755057481537 \cdot 10^{-290}:\\
\;\;\;\;\frac{\frac{1}{\frac{\sqrt{\sqrt{b_2 \cdot b_2 - a \cdot c} - b_2}}{1}}}{\frac{\sqrt{\sqrt{b_2 \cdot b_2 - a \cdot c} - b_2}}{c}}\\
\mathbf{elif}\;b_2 \le 3.7711811459025421 \cdot 10^{84}:\\
\;\;\;\;\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.1991509811871915e+121)) {
temp = (-0.5 * (c / b_2));
} else {
double temp_1;
if ((b_2 <= -3.4150755057481537e-290)) {
temp_1 = ((1.0 / (sqrt((sqrt(((b_2 * b_2) - (a * c))) - b_2)) / 1.0)) / (sqrt((sqrt(((b_2 * b_2) - (a * c))) - b_2)) / c));
} else {
double temp_2;
if ((b_2 <= 3.771181145902542e+84)) {
temp_2 = ((-b_2 - sqrt(((b_2 * b_2) - (a * c)))) * (1.0 / a));
} else {
temp_2 = ((0.5 * (c / b_2)) - (2.0 * (b_2 / a)));
}
temp_1 = temp_2;
}
temp = temp_1;
}
return temp;
}



Bits error versus a



Bits error versus b_2



Bits error versus c
Results
if b_2 < -1.1991509811871915e+121Initial program 60.9
Taylor expanded around -inf 2.3
if -1.1991509811871915e+121 < b_2 < -3.4150755057481537e-290Initial program 32.9
rmApplied flip--32.9
Simplified15.4
Simplified15.4
rmApplied *-un-lft-identity15.4
Applied associate-/r*15.4
Simplified13.7
rmApplied *-un-lft-identity13.7
Applied add-sqr-sqrt13.8
Applied times-frac13.8
Applied *-un-lft-identity13.8
Applied times-frac14.5
Applied associate-/l*13.8
Simplified8.1
if -3.4150755057481537e-290 < b_2 < 3.771181145902542e+84Initial program 10.5
rmApplied div-inv10.6
if 3.771181145902542e+84 < b_2 Initial program 43.2
Taylor expanded around inf 4.1
Final simplification6.9
herbie shell --seed 2020056
(FPCore (a b_2 c)
:name "NMSE problem 3.2.1"
:precision binary64
(/ (- (- b_2) (sqrt (- (* b_2 b_2) (* a c)))) a))