\frac{\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}\begin{array}{l}
\mathbf{if}\;b_2 \leq -1.0928129976042705 \cdot 10^{+154}:\\
\;\;\;\;\frac{c}{b_2 \cdot -2}\\
\mathbf{elif}\;b_2 \leq -8.757693797729915 \cdot 10^{-306}:\\
\;\;\;\;\frac{c}{\sqrt{b_2 \cdot b_2 - c \cdot a} - b_2}\\
\mathbf{elif}\;b_2 \leq 5.897751866039278 \cdot 10^{+38}:\\
\;\;\;\;\frac{b_2}{-a} - \frac{\sqrt{b_2 \cdot b_2 - c \cdot a}}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{b_2 \cdot -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.0928129976042705e+154)
(/ c (* b_2 -2.0))
(if (<= b_2 -8.757693797729915e-306)
(/ c (- (sqrt (- (* b_2 b_2) (* c a))) b_2))
(if (<= b_2 5.897751866039278e+38)
(- (/ b_2 (- a)) (/ (sqrt (- (* b_2 b_2) (* c a))) a))
(/ (* b_2 -2.0) 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.0928129976042705e+154) {
tmp = c / (b_2 * -2.0);
} else if (b_2 <= -8.757693797729915e-306) {
tmp = c / (sqrt((b_2 * b_2) - (c * a)) - b_2);
} else if (b_2 <= 5.897751866039278e+38) {
tmp = (b_2 / -a) - (sqrt((b_2 * b_2) - (c * a)) / a);
} else {
tmp = (b_2 * -2.0) / a;
}
return tmp;
}



Bits error versus a



Bits error versus b_2



Bits error versus c
Results
if b_2 < -1.0928129976042705e154Initial program 64.0
rmApplied flip--_binary6464.0
Simplified39.1
Simplified39.1
rmApplied *-un-lft-identity_binary6439.1
Applied *-un-lft-identity_binary6439.1
Applied times-frac_binary6439.1
Simplified39.1
Simplified38.9
Taylor expanded around -inf 1.4
if -1.0928129976042705e154 < b_2 < -8.75769379772991483e-306Initial program 35.4
rmApplied flip--_binary6435.4
Simplified17.0
Simplified17.0
rmApplied *-un-lft-identity_binary6417.0
Applied *-un-lft-identity_binary6417.0
Applied times-frac_binary6417.0
Simplified17.0
Simplified8.2
if -8.75769379772991483e-306 < b_2 < 5.89775186603927786e38Initial program 10.3
rmApplied div-sub_binary6410.3
Simplified10.3
if 5.89775186603927786e38 < b_2 Initial program 35.6
Taylor expanded around inf 6.4
Simplified6.4
Final simplification7.1
herbie shell --seed 2021173
(FPCore (a b_2 c)
:name "quad2m (problem 3.2.1, negative)"
:precision binary64
(/ (- (- b_2) (sqrt (- (* b_2 b_2) (* a c)))) a))