\frac{\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}\begin{array}{l}
\mathbf{if}\;b_2 \leq -6.27171376998663 \cdot 10^{+153}:\\
\;\;\;\;-0.5 \cdot \frac{c}{b_2}\\
\mathbf{elif}\;b_2 \leq 2.775170470029038 \cdot 10^{-264}:\\
\;\;\;\;\frac{c}{\sqrt{b_2 \cdot b_2 - c \cdot a} - b_2}\\
\mathbf{elif}\;b_2 \leq 7.134037556178 \cdot 10^{+68}:\\
\;\;\;\;\frac{1}{\frac{a}{\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - c \cdot 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 -6.27171376998663e+153)
(* -0.5 (/ c b_2))
(if (<= b_2 2.775170470029038e-264)
(/ c (- (sqrt (- (* b_2 b_2) (* c a))) b_2))
(if (<= b_2 7.134037556178e+68)
(/ 1.0 (/ a (- (- b_2) (sqrt (- (* b_2 b_2) (* c 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 <= -6.27171376998663e+153) {
tmp = -0.5 * (c / b_2);
} else if (b_2 <= 2.775170470029038e-264) {
tmp = c / (sqrt((b_2 * b_2) - (c * a)) - b_2);
} else if (b_2 <= 7.134037556178e+68) {
tmp = 1.0 / (a / (-b_2 - sqrt((b_2 * b_2) - (c * 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 < -6.27171376998663019e153Initial program 64.0
Taylor expanded around -inf 1.8
if -6.27171376998663019e153 < b_2 < 2.7751704700290381e-264Initial program 33.7
rmApplied flip--_binary6433.8
Simplified16.1
Simplified16.1
rmApplied *-un-lft-identity_binary6416.1
Applied *-un-lft-identity_binary6416.1
Applied times-frac_binary6416.1
Simplified16.1
Simplified8.6
if 2.7751704700290381e-264 < b_2 < 7.13403755617800045e68Initial program 8.4
rmApplied clear-num_binary648.6
if 7.13403755617800045e68 < b_2 Initial program 42.5
Taylor expanded around inf 5.1
Final simplification6.7
herbie shell --seed 2020253
(FPCore (a b_2 c)
:name "quad2m (problem 3.2.1, negative)"
:precision binary64
(/ (- (- b_2) (sqrt (- (* b_2 b_2) (* a c)))) a))