\frac{\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}\begin{array}{l}
\mathbf{if}\;b_2 \le -4.6537017569063518 \cdot 10^{-82}:\\
\;\;\;\;\frac{-1}{2} \cdot \frac{c}{b_2}\\
\mathbf{elif}\;b_2 \le 1.0479007947857462 \cdot 10^{99}:\\
\;\;\;\;1 \cdot \frac{\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}\\
\mathbf{else}:\\
\;\;\;\;1 \cdot \left(\frac{1}{2} \cdot \frac{c}{b_2} - 2 \cdot \frac{b_2}{a}\right)\\
\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.653701756906352e-82)) {
temp = (-0.5 * (c / b_2));
} else {
double temp_1;
if ((b_2 <= 1.0479007947857462e+99)) {
temp_1 = (1.0 * ((-b_2 - sqrt(((b_2 * b_2) - (a * c)))) / a));
} else {
temp_1 = (1.0 * ((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.653701756906352e-82Initial program 52.8
Taylor expanded around -inf 9.1
if -4.653701756906352e-82 < b_2 < 1.0479007947857462e+99Initial program 13.4
rmApplied clear-num13.5
rmApplied *-un-lft-identity13.5
Applied *-un-lft-identity13.5
Applied times-frac13.5
Applied add-cube-cbrt13.5
Applied times-frac13.5
Simplified13.5
Simplified13.4
if 1.0479007947857462e+99 < b_2 Initial program 47.6
rmApplied clear-num47.6
rmApplied *-un-lft-identity47.6
Applied *-un-lft-identity47.6
Applied times-frac47.6
Applied add-cube-cbrt47.6
Applied times-frac47.6
Simplified47.6
Simplified47.6
Taylor expanded around inf 4.1
Final simplification10.2
herbie shell --seed 2020065 +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))