\frac{\left(-b_2\right) + \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}\begin{array}{l}
\mathbf{if}\;b_2 \le -2.86885461377155539 \cdot 10^{112}:\\
\;\;\;\;\frac{1}{2} \cdot \frac{c}{b_2} - 2 \cdot \frac{b_2}{a}\\
\mathbf{elif}\;b_2 \le -1.43974566180272646 \cdot 10^{-260}:\\
\;\;\;\;\frac{\left(-b_2\right) + \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}\\
\mathbf{elif}\;b_2 \le 2.4235533085097852 \cdot 10^{67}:\\
\;\;\;\;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 <= -2.8688546137715554e+112)) {
temp = ((0.5 * (c / b_2)) - (2.0 * (b_2 / a)));
} else {
double temp_1;
if ((b_2 <= -1.4397456618027265e-260)) {
temp_1 = ((-b_2 + sqrt(((b_2 * b_2) - (a * c)))) / a);
} else {
double temp_2;
if ((b_2 <= 2.4235533085097852e+67)) {
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 < -2.8688546137715554e+112Initial program 50.4
Taylor expanded around -inf 3.9
if -2.8688546137715554e+112 < b_2 < -1.4397456618027265e-260Initial program 7.9
if -1.4397456618027265e-260 < b_2 < 2.4235533085097852e+67Initial program 29.0
rmApplied flip-+29.0
Simplified16.0
rmApplied *-un-lft-identity16.0
Applied associate-/r*16.0
Simplified13.8
rmApplied *-un-lft-identity13.8
Applied *-un-lft-identity13.8
Applied times-frac13.8
Applied associate-/l*13.8
Simplified9.3
rmApplied *-un-lft-identity9.3
Applied *-un-lft-identity9.3
Applied times-frac9.3
Applied add-sqr-sqrt9.3
Applied times-frac9.3
Simplified9.3
Simplified8.9
if 2.4235533085097852e+67 < b_2 Initial program 58.0
Taylor expanded around inf 3.0
Final simplification6.3
herbie shell --seed 2020058
(FPCore (a b_2 c)
:name "quad2p (problem 3.2.1, positive)"
:precision binary64
(/ (+ (- b_2) (sqrt (- (* b_2 b_2) (* a c)))) a))