\frac{\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}\begin{array}{l}
\mathbf{if}\;b_2 \le -8.76489248842270709 \cdot 10^{153}:\\
\;\;\;\;\frac{-1}{2} \cdot \frac{c}{b_2}\\
\mathbf{elif}\;b_2 \le 6.3411928596588654 \cdot 10^{-251}:\\
\;\;\;\;\frac{c}{1 \cdot \left(\sqrt{b_2 \cdot b_2 - a \cdot c} - b_2\right)}\\
\mathbf{elif}\;b_2 \le 1.70350465332629402 \cdot 10^{111}:\\
\;\;\;\;\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 <= -8.764892488422707e+153)) {
VAR = (-0.5 * (c / b_2));
} else {
double VAR_1;
if ((b_2 <= 6.3411928596588654e-251)) {
VAR_1 = (c / (1.0 * (sqrt(((b_2 * b_2) - (a * c))) - b_2)));
} else {
double VAR_2;
if ((b_2 <= 1.703504653326294e+111)) {
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 < -8.764892488422707e+153Initial program 64.0
Taylor expanded around -inf 1.7
if -8.764892488422707e+153 < b_2 < 6.3411928596588654e-251Initial program 32.7
rmApplied flip--32.7
Simplified15.7
Simplified15.7
rmApplied *-commutative15.7
Applied associate-/l*15.4
Applied associate-/l/11.3
Simplified8.2
if 6.3411928596588654e-251 < b_2 < 1.703504653326294e+111Initial program 8.4
rmApplied div-inv8.5
if 1.703504653326294e+111 < b_2 Initial program 49.6
Taylor expanded around inf 3.0
Final simplification6.4
herbie shell --seed 2020071
(FPCore (a b_2 c)
:name "quad2m (problem 3.2.1, negative)"
:precision binary64
(/ (- (- b_2) (sqrt (- (* b_2 b_2) (* a c)))) a))