\frac{\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}\begin{array}{l}
\mathbf{if}\;b_2 \leq -1.3437071385932138 \cdot 10^{+154}:\\
\;\;\;\;\frac{c}{\left(-b_2\right) - b_2}\\
\mathbf{elif}\;b_2 \leq -2.6604198772285348 \cdot 10^{-226}:\\
\;\;\;\;\frac{c}{\sqrt{b_2 \cdot b_2 - c \cdot a} - b_2}\\
\mathbf{elif}\;b_2 \leq 8.501638784003518 \cdot 10^{+114}:\\
\;\;\;\;\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.3437071385932138e+154)
(/ c (- (- b_2) b_2))
(if (<= b_2 -2.6604198772285348e-226)
(/ c (- (sqrt (- (* b_2 b_2) (* c a))) b_2))
(if (<= b_2 8.501638784003518e+114)
(/ (- (- 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.3437071385932138e+154) {
tmp = c / (-b_2 - b_2);
} else if (b_2 <= -2.6604198772285348e-226) {
tmp = c / (sqrt((b_2 * b_2) - (c * a)) - b_2);
} else if (b_2 <= 8.501638784003518e+114) {
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.34370713859321383e154Initial 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
Simplified39.0
Taylor expanded around -inf 1.4
Simplified1.4
if -1.34370713859321383e154 < b_2 < -2.660419877228535e-226Initial program 37.2
rmApplied flip--_binary6437.2
Simplified15.6
Simplified15.6
rmApplied *-un-lft-identity_binary6415.6
Applied *-un-lft-identity_binary6415.6
Applied times-frac_binary6415.6
Simplified15.6
Simplified6.5
if -2.660419877228535e-226 < b_2 < 8.50163878400351821e114Initial program 10.3
if 8.50163878400351821e114 < b_2 Initial program 50.8
Taylor expanded around inf 3.3
Simplified3.3
Final simplification6.6
herbie shell --seed 2020353
(FPCore (a b_2 c)
:name "quad2m (problem 3.2.1, negative)"
:precision binary64
(/ (- (- b_2) (sqrt (- (* b_2 b_2) (* a c)))) a))