\frac{\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}\begin{array}{l}
\mathbf{if}\;b_2 \le -1.05041587793060756 \cdot 10^{69}:\\
\;\;\;\;\frac{-1}{2} \cdot \frac{c}{b_2}\\
\mathbf{elif}\;b_2 \le 3.0465886440622224 \cdot 10^{-217}:\\
\;\;\;\;1 \cdot \frac{c}{\sqrt{b_2 \cdot b_2 - a \cdot c} - b_2}\\
\mathbf{elif}\;b_2 \le 1.53222666392243104 \cdot 10^{66}:\\
\;\;\;\;\left(\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - a \cdot c}\right) \cdot \frac{1}{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 VAR;
if ((b_2 <= -1.0504158779306076e+69)) {
VAR = (-0.5 * (c / b_2));
} else {
double VAR_1;
if ((b_2 <= 3.0465886440622224e-217)) {
VAR_1 = (1.0 * (c / (sqrt(((b_2 * b_2) - (a * c))) - b_2)));
} else {
double VAR_2;
if ((b_2 <= 1.532226663922431e+66)) {
VAR_2 = ((-b_2 - sqrt(((b_2 * b_2) - (a * c)))) * (1.0 / a));
} else {
VAR_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 < -1.0504158779306076e+69Initial program 57.8
Taylor expanded around -inf 3.5
if -1.0504158779306076e+69 < b_2 < 3.0465886440622224e-217Initial program 28.6
rmApplied flip--28.8
Simplified16.4
Simplified16.4
rmApplied *-un-lft-identity16.4
Applied associate-/r*16.4
Simplified14.0
rmApplied clear-num14.0
Simplified10.4
rmApplied *-un-lft-identity10.4
Applied *-un-lft-identity10.4
Applied times-frac10.4
Applied add-cube-cbrt10.4
Applied times-frac10.4
Simplified10.4
Simplified10.1
if 3.0465886440622224e-217 < b_2 < 1.532226663922431e+66Initial program 7.6
rmApplied div-inv7.8
if 1.532226663922431e+66 < b_2 Initial program 39.7
rmApplied flip--61.8
Simplified61.1
Simplified61.1
Taylor expanded around 0 5.3
Final simplification7.0
herbie shell --seed 2020092
(FPCore (a b_2 c)
:name "NMSE problem 3.2.1"
:precision binary64
(/ (- (- b_2) (sqrt (- (* b_2 b_2) (* a c)))) a))