\frac{\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}\begin{array}{l}
\mathbf{if}\;b_2 \le -4.01157973271056712 \cdot 10^{-81}:\\
\;\;\;\;\frac{-1}{2} \cdot \frac{c}{b_2}\\
\mathbf{elif}\;b_2 \le 1.3176462918432122 \cdot 10^{99}:\\
\;\;\;\;\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.011579732710567e-81)) {
temp = (-0.5 * (c / b_2));
} else {
double temp_1;
if ((b_2 <= 1.3176462918432122e+99)) {
temp_1 = (1.0 / (a / (-b_2 - sqrt(((b_2 * b_2) - (a * c))))));
} else {
temp_1 = ((0.5 * (c / b_2)) - (2.0 * (b_2 / a)));
}
temp = temp_1;
}
return temp;
}



Bits error versus a



Bits error versus b_2



Bits error versus c
Results
if b_2 < -4.011579732710567e-81Initial program 52.8
Taylor expanded around -inf 9.4
if -4.011579732710567e-81 < b_2 < 1.3176462918432122e+99Initial program 12.9
rmApplied clear-num13.0
if 1.3176462918432122e+99 < b_2 Initial program 46.8
Taylor expanded around inf 3.7
Final simplification10.1
herbie shell --seed 2020060 +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))