\frac{\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}\begin{array}{l}
\mathbf{if}\;b_2 \leq -9.262564350171407 \cdot 10^{-13}:\\
\;\;\;\;\frac{-0.5 \cdot c}{b_2}\\
\mathbf{elif}\;b_2 \leq -7.4406991673960255 \cdot 10^{-261}:\\
\;\;\;\;\frac{\frac{a}{\frac{\sqrt{b_2 \cdot b_2 - c \cdot a} - b_2}{c}}}{a}\\
\mathbf{elif}\;b_2 \leq 2.354428103312287 \cdot 10^{+18}:\\
\;\;\;\;\frac{-b_2}{a} - \frac{\sqrt{b_2 \cdot b_2 - c \cdot a}}{a}\\
\mathbf{else}:\\
\;\;\;\;-2 \cdot \frac{b_2}{a} + 0.5 \cdot \frac{c}{b_2}\\
\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 -9.262564350171407e-13)
(/ (* -0.5 c) b_2)
(if (<= b_2 -7.4406991673960255e-261)
(/ (/ a (/ (- (sqrt (- (* b_2 b_2) (* c a))) b_2) c)) a)
(if (<= b_2 2.354428103312287e+18)
(- (/ (- b_2) a) (/ (sqrt (- (* b_2 b_2) (* c a))) a))
(+ (* -2.0 (/ b_2 a)) (* 0.5 (/ c b_2)))))))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 <= -9.262564350171407e-13) {
tmp = (-0.5 * c) / b_2;
} else if (b_2 <= -7.4406991673960255e-261) {
tmp = (a / ((sqrt((b_2 * b_2) - (c * a)) - b_2) / c)) / a;
} else if (b_2 <= 2.354428103312287e+18) {
tmp = (-b_2 / a) - (sqrt((b_2 * b_2) - (c * a)) / a);
} else {
tmp = (-2.0 * (b_2 / a)) + (0.5 * (c / b_2));
}
return tmp;
}



Bits error versus a



Bits error versus b_2



Bits error versus c
Results
if b_2 < -9.2625643501714075e-13Initial program 55.2
Taylor expanded around -inf 6.6
rmApplied associate-*r/_binary646.5
if -9.2625643501714075e-13 < b_2 < -7.44069916739602553e-261Initial program 25.8
rmApplied flip--_binary6425.8
Simplified17.0
Simplified17.0
rmApplied associate-/l*_binary6412.5
if -7.44069916739602553e-261 < b_2 < 2354428103312287230Initial program 10.9
rmApplied div-sub_binary6410.9
if 2354428103312287230 < b_2 Initial program 34.3
Taylor expanded around inf 6.8
Simplified6.8
Final simplification8.7
herbie shell --seed 2021028
(FPCore (a b_2 c)
:name "quad2m (problem 3.2.1, negative)"
:precision binary64
(/ (- (- b_2) (sqrt (- (* b_2 b_2) (* a c)))) a))