\frac{\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}\begin{array}{l}
\mathbf{if}\;b_2 \le -4.41916989011516482 \cdot 10^{111}:\\
\;\;\;\;\frac{-1}{2} \cdot \frac{c}{b_2}\\
\mathbf{elif}\;b_2 \le 1.4444479783899298 \cdot 10^{-267}:\\
\;\;\;\;1 \cdot \frac{c}{\sqrt{b_2 \cdot b_2 - a \cdot c} - b_2}\\
\mathbf{elif}\;b_2 \le 1.30179762345334763 \cdot 10^{80}:\\
\;\;\;\;\frac{1}{\frac{a}{\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - a \cdot c}}}\\
\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 <= -4.419169890115165e+111)) {
temp = (-0.5 * (c / b_2));
} else {
double temp_1;
if ((b_2 <= 1.4444479783899298e-267)) {
temp_1 = (1.0 * (c / (sqrt(((b_2 * b_2) - (a * c))) - b_2)));
} else {
double temp_2;
if ((b_2 <= 1.3017976234533476e+80)) {
temp_2 = (1.0 / (a / (-b_2 - sqrt(((b_2 * b_2) - (a * c))))));
} 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 < -4.419169890115165e+111Initial program 60.9
Taylor expanded around -inf 2.7
if -4.419169890115165e+111 < b_2 < 1.4444479783899298e-267Initial program 30.9
rmApplied flip--30.9
Simplified15.2
Simplified15.2
rmApplied *-un-lft-identity15.2
Applied *-un-lft-identity15.2
Applied times-frac15.2
Applied associate-/l*15.4
Simplified14.7
rmApplied div-inv14.7
Simplified8.5
if 1.4444479783899298e-267 < b_2 < 1.3017976234533476e+80Initial program 7.9
rmApplied clear-num8.0
if 1.3017976234533476e+80 < b_2 Initial program 43.3
Taylor expanded around inf 3.9
Final simplification6.3
herbie shell --seed 2020058
(FPCore (a b_2 c)
:name "NMSE problem 3.2.1"
:precision binary64
(/ (- (- b_2) (sqrt (- (* b_2 b_2) (* a c)))) a))