\frac{\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}\begin{array}{l}
\mathbf{if}\;b_2 \leq -1.0591588073931438 \cdot 10^{+154}:\\
\;\;\;\;-0.5 \cdot \frac{c}{b_2}\\
\mathbf{elif}\;b_2 \leq 1.6106223235737979 \cdot 10^{-307}:\\
\;\;\;\;\frac{c}{\sqrt{b_2 \cdot b_2 - c \cdot a} - b_2}\\
\mathbf{elif}\;b_2 \leq 2.841423602214126 \cdot 10^{+70}:\\
\;\;\;\;\frac{\left(-b_2\right) - \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.0591588073931438e+154)
(* -0.5 (/ c b_2))
(if (<= b_2 1.6106223235737979e-307)
(/ c (- (sqrt (- (* b_2 b_2) (* c a))) b_2))
(if (<= b_2 2.841423602214126e+70)
(/ (- (- b_2) (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.0591588073931438e+154) {
tmp = -0.5 * (c / b_2);
} else if (b_2 <= 1.6106223235737979e-307) {
tmp = c / (sqrt((b_2 * b_2) - (c * a)) - b_2);
} else if (b_2 <= 2.841423602214126e+70) {
tmp = (-b_2 - 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.05915880739314384e154Initial program 64.0
rmApplied flip--_binary6464.0
Simplified36.9
Simplified36.9
rmApplied *-un-lft-identity_binary6436.9
Applied *-un-lft-identity_binary6436.9
Applied times-frac_binary6436.9
Simplified36.9
Simplified36.8
Taylor expanded around -inf 0.8
if -1.05915880739314384e154 < b_2 < 1.6106223235737979e-307Initial program 35.3
rmApplied flip--_binary6435.3
Simplified16.2
Simplified16.2
rmApplied *-un-lft-identity_binary6416.2
Applied *-un-lft-identity_binary6416.2
Applied times-frac_binary6416.2
Simplified16.2
Simplified8.4
if 1.6106223235737979e-307 < b_2 < 2.84142360221412621e70Initial program 9.7
if 2.84142360221412621e70 < b_2 Initial program 40.7
Taylor expanded around inf 4.7
Final simplification6.7
herbie shell --seed 2021174
(FPCore (a b_2 c)
:name "quad2m (problem 3.2.1, negative)"
:precision binary64
(/ (- (- b_2) (sqrt (- (* b_2 b_2) (* a c)))) a))