\frac{\left(-b_2\right) + \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}\begin{array}{l}
\mathbf{if}\;b_2 \le -4.06002386255704936 \cdot 10^{127}:\\
\;\;\;\;\frac{1}{2} \cdot \frac{c}{b_2} - 2 \cdot \frac{b_2}{a}\\
\mathbf{elif}\;b_2 \le 9.074871364580517 \cdot 10^{-259}:\\
\;\;\;\;\frac{1}{\frac{a}{\sqrt{b_2 \cdot b_2 - a \cdot c} - b_2}}\\
\mathbf{elif}\;b_2 \le 2.35728636717399296 \cdot 10^{-31}:\\
\;\;\;\;\frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{\left(\sqrt[3]{a} \cdot \sqrt[3]{a}\right) \cdot \frac{1}{\sqrt[3]{a} \cdot \sqrt[3]{a}}} \cdot \frac{\frac{\sqrt[3]{1}}{\frac{\frac{\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - a \cdot c}}{\sqrt[3]{a}}}{c}}}{\sqrt[3]{a}}\\
\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.0600238625570494e+127)) {
temp = ((0.5 * (c / b_2)) - (2.0 * (b_2 / a)));
} else {
double temp_1;
if ((b_2 <= 9.074871364580517e-259)) {
temp_1 = (1.0 / (a / (sqrt(((b_2 * b_2) - (a * c))) - b_2)));
} else {
double temp_2;
if ((b_2 <= 2.357286367173993e-31)) {
temp_2 = (((cbrt(1.0) * cbrt(1.0)) / ((cbrt(a) * cbrt(a)) * (1.0 / (cbrt(a) * cbrt(a))))) * ((cbrt(1.0) / (((-b_2 - sqrt(((b_2 * b_2) - (a * c)))) / cbrt(a)) / c)) / cbrt(a)));
} 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.0600238625570494e+127Initial program 54.1
Taylor expanded around -inf 3.2
if -4.0600238625570494e+127 < b_2 < 9.074871364580517e-259Initial program 9.0
rmApplied clear-num9.1
Simplified9.1
if 9.074871364580517e-259 < b_2 < 2.357286367173993e-31Initial program 25.5
rmApplied flip-+25.6
Simplified17.9
rmApplied clear-num17.9
Simplified14.4
rmApplied add-cube-cbrt15.2
Applied *-un-lft-identity15.2
Applied add-cube-cbrt14.4
Applied *-un-lft-identity14.4
Applied times-frac14.5
Applied times-frac14.5
Applied add-cube-cbrt14.5
Applied times-frac14.4
Applied times-frac11.9
Simplified12.0
if 2.357286367173993e-31 < b_2 Initial program 55.3
Taylor expanded around inf 6.6
Final simplification7.9
herbie shell --seed 2020056 +o rules:numerics
(FPCore (a b_2 c)
:name "quad2p (problem 3.2.1, positive)"
:precision binary64
(/ (+ (- b_2) (sqrt (- (* b_2 b_2) (* a c)))) a))