\frac{\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}\begin{array}{l}
\mathbf{if}\;b_2 \leq -1.153356161151894 \cdot 10^{+129}:\\
\;\;\;\;-0.5 \cdot \frac{c}{b_2}\\
\mathbf{elif}\;b_2 \leq 5.908287073267299 \cdot 10^{-254}:\\
\;\;\;\;\frac{c}{\sqrt{b_2 \cdot b_2 - c \cdot a} - b_2}\\
\mathbf{elif}\;b_2 \leq 9.854241968699214 \cdot 10^{+41}:\\
\;\;\;\;\frac{\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - c \cdot a}}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{b_2} \cdot 0.5 - 2 \cdot \frac{b_2}{a}\\
\end{array}(FPCore (a b_2 c) :precision binary64 (/ (- (- b_2) (sqrt (- (* b_2 b_2) (* a c)))) a))
(FPCore (a b_2 c)
:precision binary64
(if (<= b_2 -1.153356161151894e+129)
(* -0.5 (/ c b_2))
(if (<= b_2 5.908287073267299e-254)
(/ c (- (sqrt (- (* b_2 b_2) (* c a))) b_2))
(if (<= b_2 9.854241968699214e+41)
(/ (- (- b_2) (sqrt (- (* b_2 b_2) (* c a)))) a)
(- (* (/ c b_2) 0.5) (* 2.0 (/ b_2 a)))))))double code(double a, double b_2, double c) {
return (((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 tmp;
if ((b_2 <= -1.153356161151894e+129)) {
tmp = ((double) (-0.5 * (c / b_2)));
} else {
double tmp_1;
if ((b_2 <= 5.908287073267299e-254)) {
tmp_1 = (c / ((double) (((double) sqrt(((double) (((double) (b_2 * b_2)) - ((double) (c * a)))))) - b_2)));
} else {
double tmp_2;
if ((b_2 <= 9.854241968699214e+41)) {
tmp_2 = (((double) (((double) -(b_2)) - ((double) sqrt(((double) (((double) (b_2 * b_2)) - ((double) (c * a)))))))) / a);
} else {
tmp_2 = ((double) (((double) ((c / b_2) * 0.5)) - ((double) (2.0 * (b_2 / a)))));
}
tmp_1 = tmp_2;
}
tmp = tmp_1;
}
return tmp;
}



Bits error versus a



Bits error versus b_2



Bits error versus c
Results
if b_2 < -1.1533561611518939e129Initial program 61.4
Taylor expanded around -inf 1.8
if -1.1533561611518939e129 < b_2 < 5.90828707326729903e-254Initial program 31.4
rmApplied flip--_binary6431.4
Simplified16.5
Simplified16.5
rmApplied *-un-lft-identity_binary6416.5
Applied *-un-lft-identity_binary6416.5
Applied times-frac_binary6416.5
Simplified16.5
Simplified9.2
if 5.90828707326729903e-254 < b_2 < 9.85424196869921409e41Initial program 9.3
if 9.85424196869921409e41 < b_2 Initial program 37.1
Taylor expanded around inf 6.2
Final simplification7.1
herbie shell --seed 2020219
(FPCore (a b_2 c)
:name "quad2m (problem 3.2.1, negative)"
:precision binary64
(/ (- (- b_2) (sqrt (- (* b_2 b_2) (* a c)))) a))