\frac{\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}\begin{array}{l}
\mathbf{if}\;b_2 \leq -1.121424513812188 \cdot 10^{+154}:\\
\;\;\;\;-0.5 \cdot \frac{c}{b_2}\\
\mathbf{elif}\;b_2 \leq -6.058114844713645 \cdot 10^{-235}:\\
\;\;\;\;\frac{c}{\sqrt{b_2 \cdot b_2 - c \cdot a} - b_2}\\
\mathbf{elif}\;b_2 \leq 3.086691257664919 \cdot 10^{+98}:\\
\;\;\;\;\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.121424513812188e+154)
(* -0.5 (/ c b_2))
(if (<= b_2 -6.058114844713645e-235)
(/ c (- (sqrt (- (* b_2 b_2) (* c a))) b_2))
(if (<= b_2 3.086691257664919e+98)
(/ (- (- 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 (-b_2 - sqrt((b_2 * b_2) - (a * c))) / a;
}
double code(double a, double b_2, double c) {
double tmp;
if (b_2 <= -1.121424513812188e+154) {
tmp = -0.5 * (c / b_2);
} else if (b_2 <= -6.058114844713645e-235) {
tmp = c / (sqrt((b_2 * b_2) - (c * a)) - b_2);
} else if (b_2 <= 3.086691257664919e+98) {
tmp = (-b_2 - sqrt((b_2 * b_2) - (c * a))) / a;
} else {
tmp = ((c / b_2) * 0.5) - (2.0 * (b_2 / a));
}
return tmp;
}



Bits error versus a



Bits error versus b_2



Bits error versus c
Results
if b_2 < -1.1214245138121879e154Initial program 64.0
Taylor expanded around -inf 1.3
if -1.1214245138121879e154 < b_2 < -6.05811484471364504e-235Initial program 36.3
rmApplied clear-num_binary6436.3
rmApplied flip--_binary6436.3
Applied associate-/r/_binary6436.4
Applied associate-/r*_binary6436.4
Simplified13.8
Taylor expanded around 0 7.2
if -6.05811484471364504e-235 < b_2 < 3.086691257664919e98Initial program 9.5
if 3.086691257664919e98 < b_2 Initial program 46.9
Taylor expanded around inf 3.3
Final simplification6.4
herbie shell --seed 2020356
(FPCore (a b_2 c)
:name "quad2m (problem 3.2.1, negative)"
:precision binary64
(/ (- (- b_2) (sqrt (- (* b_2 b_2) (* a c)))) a))