\frac{\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}\begin{array}{l}
\mathbf{if}\;b_2 \leq -1.3429027736351954 \cdot 10^{+154}:\\
\;\;\;\;\frac{c}{\left(0.5 \cdot \frac{c \cdot a}{b_2} - b_2\right) - b_2}\\
\mathbf{elif}\;b_2 \leq -1.2914624728520754 \cdot 10^{-254}:\\
\;\;\;\;\frac{c}{\sqrt{b_2 \cdot b_2 - c \cdot a} - b_2}\\
\mathbf{elif}\;b_2 \leq 1.202936056126418 \cdot 10^{+131}:\\
\;\;\;\;\frac{\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - c \cdot a}}{a}\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \frac{c}{b_2} - 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.3429027736351954e+154)
(/ c (- (- (* 0.5 (/ (* c a) b_2)) b_2) b_2))
(if (<= b_2 -1.2914624728520754e-254)
(/ c (- (sqrt (- (* b_2 b_2) (* c a))) b_2))
(if (<= b_2 1.202936056126418e+131)
(/ (- (- b_2) (sqrt (- (* b_2 b_2) (* c a)))) a)
(- (* 0.5 (/ c b_2)) (* 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.3429027736351954e+154) {
tmp = c / (((0.5 * ((c * a) / b_2)) - b_2) - b_2);
} else if (b_2 <= -1.2914624728520754e-254) {
tmp = c / (sqrt((b_2 * b_2) - (c * a)) - b_2);
} else if (b_2 <= 1.202936056126418e+131) {
tmp = (-b_2 - sqrt((b_2 * b_2) - (c * a))) / a;
} else {
tmp = (0.5 * (c / b_2)) - (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.34290277363519543e154Initial program 64.0
rmApplied flip--_binary6464.0
Simplified38.6
Simplified38.6
rmApplied *-un-lft-identity_binary6438.6
Applied *-un-lft-identity_binary6438.6
Applied times-frac_binary6438.6
Simplified38.6
Simplified38.4
Taylor expanded around -inf 7.0
if -1.34290277363519543e154 < b_2 < -1.2914624728520754e-254Initial program 36.9
rmApplied flip--_binary6436.9
Simplified16.4
Simplified16.4
rmApplied *-un-lft-identity_binary6416.4
Applied *-un-lft-identity_binary6416.4
Applied times-frac_binary6416.4
Simplified16.4
Simplified7.1
if -1.2914624728520754e-254 < b_2 < 1.2029360561264179e131Initial program 9.9
if 1.2029360561264179e131 < b_2 Initial program 55.4
Taylor expanded around inf 3.0
Final simplification7.5
herbie shell --seed 2020339
(FPCore (a b_2 c)
:name "quad2m (problem 3.2.1, negative)"
:precision binary64
(/ (- (- b_2) (sqrt (- (* b_2 b_2) (* a c)))) a))