\frac{\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}
\begin{array}{l}
\mathbf{if}\;b_2 \leq -4.195208749600831 \cdot 10^{-95}:\\
\;\;\;\;-0.5 \cdot \frac{c}{b_2}\\
\mathbf{elif}\;b_2 \leq 1.8985554710420717 \cdot 10^{+49}:\\
\;\;\;\;\frac{\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - c \cdot a}}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{b_2 \cdot -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 -4.195208749600831e-95)
(* -0.5 (/ c b_2))
(if (<= b_2 1.8985554710420717e+49)
(/ (- (- b_2) (sqrt (- (* b_2 b_2) (* c a)))) a)
(/ (* b_2 -2.0) 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.195208749600831e-95) {
tmp = -0.5 * (c / b_2);
} else if (b_2 <= 1.8985554710420717e+49) {
tmp = (-b_2 - sqrt((b_2 * b_2) - (c * a))) / a;
} else {
tmp = (b_2 * -2.0) / a;
}
return tmp;
}



Bits error versus a



Bits error versus b_2



Bits error versus c
Results
if b_2 < -4.1952087496008309e-95Initial program 51.8
Taylor expanded in b_2 around -inf 10.6
if -4.1952087496008309e-95 < b_2 < 1.89855547104207169e49Initial program 13.8
Applied *-un-lft-identity_binary6413.8
Applied *-un-lft-identity_binary6413.8
Applied times-frac_binary6413.8
if 1.89855547104207169e49 < b_2 Initial program 37.8
Taylor expanded in b_2 around inf 5.0
Final simplification10.7
herbie shell --seed 2021215
(FPCore (a b_2 c)
:name "quad2m (problem 3.2.1, negative)"
:precision binary64
(/ (- (- b_2) (sqrt (- (* b_2 b_2) (* a c)))) a))