\frac{\left(-b_2\right) + \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}\begin{array}{l}
\mathbf{if}\;b_2 \le -1.88902638683874615 \cdot 10^{136}:\\
\;\;\;\;\frac{1}{2} \cdot \frac{c}{b_2} - 2 \cdot \frac{b_2}{a}\\
\mathbf{elif}\;b_2 \le -1.9723703441245781 \cdot 10^{-212}:\\
\;\;\;\;\frac{1}{\frac{a}{\sqrt{b_2 \cdot b_2 - a \cdot c} - b_2}}\\
\mathbf{elif}\;b_2 \le 7.7751312769533436 \cdot 10^{90}:\\
\;\;\;\;1 \cdot \frac{\frac{c}{\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - a \cdot c}}}{1}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{2} \cdot \frac{c}{b_2}\\
\end{array}double code(double a, double b_2, double c) {
return ((double) (((double) (((double) -(b_2)) + ((double) sqrt(((double) (((double) (b_2 * b_2)) - ((double) (a * c)))))))) / a));
}
double code(double a, double b_2, double c) {
double VAR;
if ((b_2 <= -1.8890263868387462e+136)) {
VAR = ((double) (((double) (0.5 * ((double) (c / b_2)))) - ((double) (2.0 * ((double) (b_2 / a))))));
} else {
double VAR_1;
if ((b_2 <= -1.972370344124578e-212)) {
VAR_1 = ((double) (1.0 / ((double) (a / ((double) (((double) sqrt(((double) (((double) (b_2 * b_2)) - ((double) (a * c)))))) - b_2))))));
} else {
double VAR_2;
if ((b_2 <= 7.775131276953344e+90)) {
VAR_2 = ((double) (1.0 * ((double) (((double) (c / ((double) (((double) -(b_2)) - ((double) sqrt(((double) (((double) (b_2 * b_2)) - ((double) (a * c)))))))))) / 1.0))));
} else {
VAR_2 = ((double) (-0.5 * ((double) (c / b_2))));
}
VAR_1 = VAR_2;
}
VAR = VAR_1;
}
return VAR;
}



Bits error versus a



Bits error versus b_2



Bits error versus c
Results
if b_2 < -1.8890263868387462e+136Initial program 57.3
Taylor expanded around -inf 2.7
if -1.8890263868387462e+136 < b_2 < -1.972370344124578e-212Initial program 8.1
rmApplied clear-num8.2
Simplified8.2
if -1.972370344124578e-212 < b_2 < 7.775131276953344e+90Initial program 28.6
rmApplied flip-+28.7
Simplified16.0
rmApplied clear-num16.1
Simplified15.0
rmApplied *-un-lft-identity15.0
Applied clear-num15.0
Applied associate-/r/14.7
Applied times-frac14.7
Simplified14.7
rmApplied associate-/r/14.0
Applied associate-/l*9.8
Simplified9.8
if 7.775131276953344e+90 < b_2 Initial program 58.3
Taylor expanded around inf 3.9
Final simplification7.1
herbie shell --seed 2020113
(FPCore (a b_2 c)
:name "quad2p (problem 3.2.1, positive)"
:precision binary64
(/ (+ (- b_2) (sqrt (- (* b_2 b_2) (* a c)))) a))