\frac{\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}\begin{array}{l}
\mathbf{if}\;b_2 \le -9.9953303736069627 \cdot 10^{147}:\\
\;\;\;\;\frac{-1}{2} \cdot \frac{c}{b_2}\\
\mathbf{elif}\;b_2 \le 2.7444235711350233 \cdot 10^{-95}:\\
\;\;\;\;\frac{\frac{1}{\sqrt{b_2 \cdot b_2 - a \cdot c} - b_2}}{\frac{1}{c}}\\
\mathbf{elif}\;b_2 \le 3.756299167326456 \cdot 10^{118}:\\
\;\;\;\;\frac{1}{\frac{a}{\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - a \cdot c}}}\\
\mathbf{else}:\\
\;\;\;\;-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 <= -9.995330373606963e+147)) {
temp = (-0.5 * (c / b_2));
} else {
double temp_1;
if ((b_2 <= 2.7444235711350233e-95)) {
temp_1 = ((1.0 / (sqrt(((b_2 * b_2) - (a * c))) - b_2)) / (1.0 / c));
} else {
double temp_2;
if ((b_2 <= 3.7562991673264556e+118)) {
temp_2 = (1.0 / (a / (-b_2 - sqrt(((b_2 * b_2) - (a * c))))));
} else {
temp_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 < -9.995330373606963e+147Initial program 63.3
Taylor expanded around -inf 1.5
if -9.995330373606963e+147 < b_2 < 2.7444235711350233e-95Initial program 28.4
rmApplied flip--30.2
Simplified16.7
Simplified16.7
rmApplied *-un-lft-identity16.7
Applied associate-/r*16.7
Simplified15.3
rmApplied div-inv15.3
Applied *-un-lft-identity15.3
Applied times-frac16.7
Applied associate-/l*15.7
Simplified11.2
if 2.7444235711350233e-95 < b_2 < 3.7562991673264556e+118Initial program 5.3
rmApplied clear-num5.5
if 3.7562991673264556e+118 < b_2 Initial program 51.6
rmApplied flip--63.6
Simplified62.6
Simplified62.6
rmApplied *-un-lft-identity62.6
Applied associate-/r*62.6
Simplified62.5
Taylor expanded around 0 2.5
Final simplification7.3
herbie shell --seed 2020066
(FPCore (a b_2 c)
:name "quad2m (problem 3.2.1, negative)"
:precision binary64
(/ (- (- b_2) (sqrt (- (* b_2 b_2) (* a c)))) a))