\frac{\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}\begin{array}{l}
\mathbf{if}\;b_2 \leq -2.241268870584179 \cdot 10^{+101}:\\
\;\;\;\;\frac{c}{b_2 \cdot -2}\\
\mathbf{elif}\;b_2 \leq -8.819800469369126 \cdot 10^{-244}:\\
\;\;\;\;\frac{c}{\sqrt{b_2 \cdot b_2 - c \cdot a} - b_2}\\
\mathbf{elif}\;b_2 \leq 1.3260214532837605 \cdot 10^{+94}:\\
\;\;\;\;\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 -2.241268870584179e+101)
(/ c (* b_2 -2.0))
(if (<= b_2 -8.819800469369126e-244)
(/ c (- (sqrt (- (* b_2 b_2) (* c a))) b_2))
(if (<= b_2 1.3260214532837605e+94)
(- (/ 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 <= -2.241268870584179e+101) {
tmp = c / (b_2 * -2.0);
} else if (b_2 <= -8.819800469369126e-244) {
tmp = c / (sqrt((b_2 * b_2) - (c * a)) - b_2);
} else if (b_2 <= 1.3260214532837605e+94) {
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 < -2.241268870584179e101Initial program 59.7
rmApplied flip--_binary6459.7
Simplified31.3
Simplified31.3
rmApplied *-un-lft-identity_binary6431.3
Applied *-un-lft-identity_binary6431.3
Applied times-frac_binary6431.3
Simplified31.3
Simplified29.8
Taylor expanded around -inf 2.7
if -2.241268870584179e101 < b_2 < -8.81980046936912641e-244Initial program 35.0
rmApplied flip--_binary6435.0
Simplified16.0
Simplified16.0
rmApplied *-un-lft-identity_binary6416.0
Applied *-un-lft-identity_binary6416.0
Applied times-frac_binary6416.0
Simplified16.0
Simplified7.4
rmApplied *-un-lft-identity_binary647.4
Applied associate-/r*_binary647.4
if -8.81980046936912641e-244 < b_2 < 1.3260214532837605e94Initial program 9.9
rmApplied div-sub_binary649.9
Simplified9.9
if 1.3260214532837605e94 < b_2 Initial program 46.4
Taylor expanded around inf 4.2
Simplified4.2
Final simplification6.6
herbie shell --seed 2021118
(FPCore (a b_2 c)
:name "quad2m (problem 3.2.1, negative)"
:precision binary64
(/ (- (- b_2) (sqrt (- (* b_2 b_2) (* a c)))) a))