\frac{\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}
\begin{array}{l}
\mathbf{if}\;b_2 \leq -4.5426505460560854 \cdot 10^{+27}:\\
\;\;\;\;-0.5 \cdot \frac{c}{b_2}\\
\mathbf{elif}\;b_2 \leq -1.1138808105799072 \cdot 10^{-298}:\\
\;\;\;\;\frac{c}{\mathsf{hypot}\left(\sqrt{-c \cdot a}, b_2\right) - b_2}\\
\mathbf{elif}\;b_2 \leq 2.145068448284974 \cdot 10^{+83}:\\
\;\;\;\;\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 -4.5426505460560854e+27)
(* -0.5 (/ c b_2))
(if (<= b_2 -1.1138808105799072e-298)
(/ c (- (hypot (sqrt (- (* c a))) b_2) b_2))
(if (<= b_2 2.145068448284974e+83)
(/ (- (- 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 <= -4.5426505460560854e+27) {
tmp = -0.5 * (c / b_2);
} else if (b_2 <= -1.1138808105799072e-298) {
tmp = c / (hypot(sqrt(-(c * a)), b_2) - b_2);
} else if (b_2 <= 2.145068448284974e+83) {
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 < -4.5426505460560854e27Initial program 56.3
Taylor expanded in b_2 around -inf 4.7
if -4.5426505460560854e27 < b_2 < -1.11388081057990716e-298Initial program 28.2
Applied flip--_binary6428.2
Simplified17.4
Simplified23.4
Applied *-un-lft-identity_binary6423.4
Applied *-un-lft-identity_binary6423.4
Applied times-frac_binary6423.4
Simplified23.4
Simplified14.1
if -1.11388081057990716e-298 < b_2 < 2.1450684482849739e83Initial program 8.8
if 2.1450684482849739e83 < b_2 Initial program 42.5
Taylor expanded in b_2 around inf 4.2
Simplified4.2
Final simplification8.0
herbie shell --seed 2022068
(FPCore (a b_2 c)
:name "quad2m (problem 3.2.1, negative)"
:precision binary64
(/ (- (- b_2) (sqrt (- (* b_2 b_2) (* a c)))) a))