\frac{\left(-b_2\right) + \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}\begin{array}{l}
\mathbf{if}\;b_2 \le -3.5940112039867074 \cdot 10^{100}:\\
\;\;\;\;\frac{1}{2} \cdot \frac{c}{b_2} - 2 \cdot \frac{b_2}{a}\\
\mathbf{elif}\;b_2 \le -2.11899432108077868 \cdot 10^{-304}:\\
\;\;\;\;\frac{1}{\frac{a}{\sqrt{b_2 \cdot b_2 - a \cdot c} - b_2}}\\
\mathbf{elif}\;b_2 \le 1.55900006758493949 \cdot 10^{64}:\\
\;\;\;\;1 \cdot \frac{c}{\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - a \cdot 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 <= -3.5940112039867074e+100)) {
temp = ((0.5 * (c / b_2)) - (2.0 * (b_2 / a)));
} else {
double temp_1;
if ((b_2 <= -2.1189943210807787e-304)) {
temp_1 = (1.0 / (a / (sqrt(((b_2 * b_2) - (a * c))) - b_2)));
} else {
double temp_2;
if ((b_2 <= 1.5590000675849395e+64)) {
temp_2 = (1.0 * (c / (-b_2 - sqrt(((b_2 * b_2) - (a * 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 < -3.5940112039867074e+100Initial program 47.3
Taylor expanded around -inf 3.8
if -3.5940112039867074e+100 < b_2 < -2.1189943210807787e-304Initial program 8.8
rmApplied clear-num9.0
Simplified9.0
if -2.1189943210807787e-304 < b_2 < 1.5590000675849395e+64Initial program 29.5
rmApplied flip-+29.5
Simplified15.7
rmApplied clear-num15.9
Simplified15.5
rmApplied clear-num15.5
Simplified9.1
rmApplied div-inv9.1
Simplified8.7
if 1.5590000675849395e+64 < b_2 Initial program 57.3
Taylor expanded around inf 3.5
Final simplification6.5
herbie shell --seed 2020057
(FPCore (a b_2 c)
:name "quad2p (problem 3.2.1, positive)"
:precision binary64
(/ (+ (- b_2) (sqrt (- (* b_2 b_2) (* a c)))) a))