\frac{\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}\begin{array}{l}
\mathbf{if}\;b_2 \leq -7.574554406152596 \cdot 10^{+159}:\\
\;\;\;\;-0.5 \cdot \frac{c}{b_2}\\
\mathbf{elif}\;b_2 \leq 5.57002644027495 \cdot 10^{-189}:\\
\;\;\;\;\frac{c}{\sqrt{b_2 \cdot b_2 - c \cdot a} - b_2}\\
\mathbf{elif}\;b_2 \leq 7.145575742995441 \cdot 10^{+73}:\\
\;\;\;\;\frac{-b_2}{a} - \frac{\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 -7.574554406152596e+159)
(* -0.5 (/ c b_2))
(if (<= b_2 5.57002644027495e-189)
(/ c (- (sqrt (- (* b_2 b_2) (* c a))) b_2))
(if (<= b_2 7.145575742995441e+73)
(- (/ (- b_2) a) (/ (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 <= -7.574554406152596e+159) {
tmp = -0.5 * (c / b_2);
} else if (b_2 <= 5.57002644027495e-189) {
tmp = c / (sqrt((b_2 * b_2) - (c * a)) - b_2);
} else if (b_2 <= 7.145575742995441e+73) {
tmp = (-b_2 / a) - (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 < -7.57455440615259601e159Initial program 64.0
Taylor expanded around -inf 1.6
if -7.57455440615259601e159 < b_2 < 5.5700264402749498e-189Initial program 31.9
rmApplied flip--_binary6432.1
Simplified17.0
Simplified17.0
rmApplied *-un-lft-identity_binary6417.0
Applied *-un-lft-identity_binary6417.0
Applied times-frac_binary6417.0
Simplified17.0
Simplified10.1
if 5.5700264402749498e-189 < b_2 < 7.1455757429954412e73Initial program 6.9
rmApplied div-sub_binary646.9
if 7.1455757429954412e73 < b_2 Initial program 42.2
Taylor expanded around inf 4.5
Final simplification7.1
herbie shell --seed 2020224
(FPCore (a b_2 c)
:name "quad2m (problem 3.2.1, negative)"
:precision binary64
(/ (- (- b_2) (sqrt (- (* b_2 b_2) (* a c)))) a))