\frac{\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}\begin{array}{l}
\mathbf{if}\;b_2 \leq -1.1713988323127373 \cdot 10^{+89}:\\
\;\;\;\;-0.5 \cdot \frac{c}{b_2}\\
\mathbf{elif}\;b_2 \leq 1.2403787709714774 \cdot 10^{-308}:\\
\;\;\;\;\frac{c}{\sqrt{b_2 \cdot b_2 - c \cdot a} - b_2}\\
\mathbf{elif}\;b_2 \leq 3.379496554939468 \cdot 10^{+54}:\\
\;\;\;\;\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.1713988323127373e+89)
(* -0.5 (/ c b_2))
(if (<= b_2 1.2403787709714774e-308)
(/ c (- (sqrt (- (* b_2 b_2) (* c a))) b_2))
(if (<= b_2 3.379496554939468e+54)
(/ (- (- 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.1713988323127373e+89) {
tmp = -0.5 * (c / b_2);
} else if (b_2 <= 1.2403787709714774e-308) {
tmp = c / (sqrt((b_2 * b_2) - (c * a)) - b_2);
} else if (b_2 <= 3.379496554939468e+54) {
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.17139883231273729e89Initial program 58.7
Taylor expanded around -inf 2.9
if -1.17139883231273729e89 < b_2 < 1.2403787709714774e-308Initial program 32.4
rmApplied clear-num_binary6432.4
rmApplied flip--_binary6432.4
Applied associate-/r/_binary6432.5
Applied associate-/r*_binary6432.5
Simplified15.6
Taylor expanded around 0 8.1
if 1.2403787709714774e-308 < b_2 < 3.37949655493946815e54Initial program 9.5
if 3.37949655493946815e54 < b_2 Initial program 39.3
Taylor expanded around inf 5.3
Final simplification6.6
herbie shell --seed 2020295
(FPCore (a b_2 c)
:name "quad2m (problem 3.2.1, negative)"
:precision binary64
(/ (- (- b_2) (sqrt (- (* b_2 b_2) (* a c)))) a))