\frac{\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}\begin{array}{l}
\mathbf{if}\;b_2 \le -73773484249037.312:\\
\;\;\;\;\frac{-1}{2} \cdot \frac{c}{b_2}\\
\mathbf{elif}\;b_2 \le -2.630698729571271 \cdot 10^{-159}:\\
\;\;\;\;\frac{\frac{a \cdot c}{a}}{\sqrt{b_2 \cdot b_2 - a \cdot c} - b_2}\\
\mathbf{elif}\;b_2 \le 8.633216037833923 \cdot 10^{65}:\\
\;\;\;\;\left(\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - a \cdot c}\right) \cdot \frac{1}{a}\\
\mathbf{else}:\\
\;\;\;\;-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 <= -73773484249037.31)) {
temp = (-0.5 * (c / b_2));
} else {
double temp_1;
if ((b_2 <= -2.630698729571271e-159)) {
temp_1 = (((a * c) / a) / (sqrt(((b_2 * b_2) - (a * c))) - b_2));
} else {
double temp_2;
if ((b_2 <= 8.633216037833923e+65)) {
temp_2 = ((-b_2 - sqrt(((b_2 * b_2) - (a * c)))) * (1.0 / a));
} else {
temp_2 = (-2.0 * (b_2 / a));
}
temp_1 = temp_2;
}
temp = temp_1;
}
return temp;
}



Bits error versus a



Bits error versus b_2



Bits error versus c
Results
if b_2 < -73773484249037.31Initial program 55.9
Taylor expanded around -inf 5.7
if -73773484249037.31 < b_2 < -2.630698729571271e-159Initial program 32.5
rmApplied flip--32.5
Simplified16.5
Simplified16.5
rmApplied div-inv16.5
rmApplied associate-*l/16.4
Simplified16.3
if -2.630698729571271e-159 < b_2 < 8.633216037833923e+65Initial program 10.9
rmApplied div-inv11.0
if 8.633216037833923e+65 < b_2 Initial program 40.1
rmApplied flip--61.8
Simplified61.0
Simplified61.0
Taylor expanded around 0 5.0
Final simplification8.9
herbie shell --seed 2020057
(FPCore (a b_2 c)
:name "quad2m (problem 3.2.1, negative)"
:precision binary64
(/ (- (- b_2) (sqrt (- (* b_2 b_2) (* a c)))) a))