\frac{\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}\begin{array}{l}
\mathbf{if}\;b_2 \le -1.27507998502897628 \cdot 10^{133}:\\
\;\;\;\;\frac{-1}{2} \cdot \frac{c}{b_2}\\
\mathbf{elif}\;b_2 \le 3.0003811195914403 \cdot 10^{-269}:\\
\;\;\;\;\frac{\frac{1}{\sqrt{b_2 \cdot b_2 - a \cdot c} - b_2}}{\frac{1}{c}}\\
\mathbf{elif}\;b_2 \le 1.77072263135177874 \cdot 10^{102}:\\
\;\;\;\;\frac{-b_2}{a} - \frac{\sqrt{b_2 \cdot b_2 - a \cdot c}}{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 <= -1.2750799850289763e+133)) {
VAR = (-0.5 * (c / b_2));
} else {
double VAR_1;
if ((b_2 <= 3.0003811195914403e-269)) {
VAR_1 = ((1.0 / (sqrt(((b_2 * b_2) - (a * c))) - b_2)) / (1.0 / c));
} else {
double VAR_2;
if ((b_2 <= 1.7707226313517787e+102)) {
VAR_2 = ((-b_2 / a) - (sqrt(((b_2 * b_2) - (a * c))) / 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 < -1.2750799850289763e+133Initial program 62.2
Taylor expanded around -inf 1.7
if -1.2750799850289763e+133 < b_2 < 3.0003811195914403e-269Initial program 32.0
rmApplied flip--32.0
Simplified15.3
Simplified15.3
rmApplied div-inv15.3
rmApplied *-commutative15.3
Applied associate-/l*14.1
Taylor expanded around 0 8.2
if 3.0003811195914403e-269 < b_2 < 1.7707226313517787e+102Initial program 9.0
rmApplied div-sub9.0
if 1.7707226313517787e+102 < b_2 Initial program 47.4
Taylor expanded around inf 3.5
Final simplification6.5
herbie shell --seed 2020078 +o rules:numerics
(FPCore (a b_2 c)
:name "quad2m (problem 3.2.1, negative)"
:precision binary64
(/ (- (- b_2) (sqrt (- (* b_2 b_2) (* a c)))) a))