\frac{\left(-b_2\right) + \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}\begin{array}{l}
\mathbf{if}\;b_2 \le -4.73423627781717686 \cdot 10^{122}:\\
\;\;\;\;\frac{1}{2} \cdot \frac{c}{b_2} - 2 \cdot \frac{b_2}{a}\\
\mathbf{elif}\;b_2 \le 1.2645910552421666 \cdot 10^{-190}:\\
\;\;\;\;\frac{\sqrt{b_2 \cdot b_2 - a \cdot c} - b_2}{a}\\
\mathbf{elif}\;b_2 \le 2.48778018025779241 \cdot 10^{65}:\\
\;\;\;\;\frac{1}{\frac{\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - a \cdot c}}{c}}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{2} \cdot \frac{c}{b_2}\\
\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.734236277817177e+122)) {
temp = ((0.5 * (c / b_2)) - (2.0 * (b_2 / a)));
} else {
double temp_1;
if ((b_2 <= 1.2645910552421666e-190)) {
temp_1 = ((sqrt(((b_2 * b_2) - (a * c))) - b_2) / a);
} else {
double temp_2;
if ((b_2 <= 2.4877801802577924e+65)) {
temp_2 = (1.0 / ((-b_2 - sqrt(((b_2 * b_2) - (a * c)))) / c));
} else {
temp_2 = (-0.5 * (c / b_2));
}
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 < -4.734236277817177e+122Initial program 52.5
Taylor expanded around -inf 3.3
if -4.734236277817177e+122 < b_2 < 1.2645910552421666e-190Initial program 10.2
rmApplied div-inv10.3
rmApplied associate-*r/10.2
Simplified10.2
if 1.2645910552421666e-190 < b_2 < 2.4877801802577924e+65Initial program 35.9
rmApplied div-inv35.9
rmApplied flip-+35.9
Applied associate-*l/36.0
Simplified16.2
Taylor expanded around 0 6.5
rmApplied clear-num6.9
Simplified6.9
if 2.4877801802577924e+65 < b_2 Initial program 58.0
Taylor expanded around inf 3.2
Final simplification6.7
herbie shell --seed 2020053
(FPCore (a b_2 c)
:name "quad2p (problem 3.2.1, positive)"
:precision binary64
(/ (+ (- b_2) (sqrt (- (* b_2 b_2) (* a c)))) a))