\frac{\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}
\begin{array}{l}
\mathbf{if}\;b_2 \leq -17117282807329.436:\\
\;\;\;\;-0.5 \cdot \frac{c}{b_2}\\
\mathbf{elif}\;b_2 \leq -2.321160141968036 \cdot 10^{-95}:\\
\;\;\;\;\frac{\frac{c \cdot a}{\mathsf{hypot}\left(\sqrt{-c \cdot a}, b_2\right) - b_2}}{a}\\
\mathbf{elif}\;b_2 \leq -7.858266012356773 \cdot 10^{-121}:\\
\;\;\;\;\frac{1}{\mathsf{fma}\left(0.5, \frac{a}{b_2}, \frac{2}{-\frac{c}{b_2}}\right)}\\
\mathbf{elif}\;b_2 \leq 3.6266309301276617 \cdot 10^{+142}:\\
\;\;\;\;\frac{\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - c \cdot a}}{a}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(0.5, \frac{c}{b_2}, -2 \cdot \frac{b_2}{a}\right)\\
\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 -17117282807329.436)
(* -0.5 (/ c b_2))
(if (<= b_2 -2.321160141968036e-95)
(/ (/ (* c a) (- (hypot (sqrt (- (* c a))) b_2) b_2)) a)
(if (<= b_2 -7.858266012356773e-121)
(/ 1.0 (fma 0.5 (/ a b_2) (/ 2.0 (- (/ c b_2)))))
(if (<= b_2 3.6266309301276617e+142)
(/ (- (- b_2) (sqrt (- (* b_2 b_2) (* c a)))) a)
(fma 0.5 (/ c b_2) (* -2.0 (/ b_2 a))))))))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 tmp;
if (b_2 <= -17117282807329.436) {
tmp = -0.5 * (c / b_2);
} else if (b_2 <= -2.321160141968036e-95) {
tmp = ((c * a) / (hypot(sqrt(-(c * a)), b_2) - b_2)) / a;
} else if (b_2 <= -7.858266012356773e-121) {
tmp = 1.0 / fma(0.5, (a / b_2), (2.0 / -(c / b_2)));
} else if (b_2 <= 3.6266309301276617e+142) {
tmp = (-b_2 - sqrt((b_2 * b_2) - (c * a))) / a;
} else {
tmp = fma(0.5, (c / b_2), (-2.0 * (b_2 / a)));
}
return tmp;
}



Bits error versus a



Bits error versus b_2



Bits error versus c
if b_2 < -17117282807329.4355Initial program 56.4
Taylor expanded in b_2 around -inf 5.0
if -17117282807329.4355 < b_2 < -2.3211601419680362e-95Initial program 38.9
Applied flip--_binary6438.9
Simplified17.0
Simplified29.1
if -2.3211601419680362e-95 < b_2 < -7.8582660123567727e-121Initial program 27.7
Applied clear-num_binary6427.7
Simplified28.2
Taylor expanded in b_2 around -inf 57.5
Simplified39.8
if -7.8582660123567727e-121 < b_2 < 3.62663093012766167e142Initial program 11.0
Applied *-un-lft-identity_binary6411.0
if 3.62663093012766167e142 < b_2 Initial program 57.6
Taylor expanded in b_2 around inf 2.1
Simplified2.1
Final simplification10.2
herbie shell --seed 2021280
(FPCore (a b_2 c)
:name "quad2m (problem 3.2.1, negative)"
:precision binary64
(/ (- (- b_2) (sqrt (- (* b_2 b_2) (* a c)))) a))