\frac{\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}\begin{array}{l}
\mathbf{if}\;b_2 \le -7.6792274201648591 \cdot 10^{47}:\\
\;\;\;\;\frac{-1}{2} \cdot \frac{c}{b_2}\\
\mathbf{elif}\;b_2 \le 8.40594418978702039 \cdot 10^{-269}:\\
\;\;\;\;\frac{\frac{a}{\frac{\sqrt{b_2 \cdot b_2 - a \cdot c} - b_2}{c}}}{a}\\
\mathbf{elif}\;b_2 \le 1.6809283377365093 \cdot 10^{101}:\\
\;\;\;\;\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 <= -7.679227420164859e+47)) {
VAR = (-0.5 * (c / b_2));
} else {
double VAR_1;
if ((b_2 <= 8.40594418978702e-269)) {
VAR_1 = ((a / ((sqrt(((b_2 * b_2) - (a * c))) - b_2) / c)) / a);
} else {
double VAR_2;
if ((b_2 <= 1.6809283377365093e+101)) {
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 < -7.679227420164859e+47Initial program 57.3
Taylor expanded around -inf 4.0
if -7.679227420164859e+47 < b_2 < 8.40594418978702e-269Initial program 27.5
rmApplied flip--27.6
Simplified16.0
Simplified16.0
rmApplied *-un-lft-identity16.0
Applied associate-/r*16.0
Simplified13.8
if 8.40594418978702e-269 < b_2 < 1.6809283377365093e+101Initial program 9.0
rmApplied div-inv9.2
if 1.6809283377365093e+101 < b_2 Initial program 47.2
Taylor expanded around inf 3.5
Final simplification8.1
herbie shell --seed 2020078
(FPCore (a b_2 c)
:name "quad2m (problem 3.2.1, negative)"
:precision binary64
(/ (- (- b_2) (sqrt (- (* b_2 b_2) (* a c)))) a))