\frac{\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}\begin{array}{l}
\mathbf{if}\;b_2 \leq -2.9773530842163696 \cdot 10^{+144}:\\
\;\;\;\;\frac{c}{\left(-b_2\right) - b_2}\\
\mathbf{elif}\;b_2 \leq 1.0241114256262157 \cdot 10^{-308}:\\
\;\;\;\;\frac{c}{\sqrt{b_2 \cdot b_2 - c \cdot a} - b_2}\\
\mathbf{elif}\;b_2 \leq 2.597222582923894 \cdot 10^{+99}:\\
\;\;\;\;\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 -2.9773530842163696e+144)
(/ c (- (- b_2) b_2))
(if (<= b_2 1.0241114256262157e-308)
(/ c (- (sqrt (- (* b_2 b_2) (* c a))) b_2))
(if (<= b_2 2.597222582923894e+99)
(/ (- (- 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 <= -2.9773530842163696e+144) {
tmp = c / (-b_2 - b_2);
} else if (b_2 <= 1.0241114256262157e-308) {
tmp = c / (sqrt((b_2 * b_2) - (c * a)) - b_2);
} else if (b_2 <= 2.597222582923894e+99) {
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 < -2.9773530842163696e144Initial program 62.9
rmApplied flip--_binary6462.9
Simplified37.8
Simplified37.8
rmApplied *-un-lft-identity_binary6437.8
Applied *-un-lft-identity_binary6437.8
Applied times-frac_binary6437.8
Simplified37.8
Simplified37.3
Taylor expanded around -inf 1.8
Simplified1.8
if -2.9773530842163696e144 < b_2 < 1.0241114256262157e-308Initial program 34.4
rmApplied flip--_binary6434.4
Simplified16.5
Simplified16.5
rmApplied *-un-lft-identity_binary6416.5
Applied *-un-lft-identity_binary6416.5
Applied times-frac_binary6416.5
Simplified16.5
Simplified8.0
if 1.0241114256262157e-308 < b_2 < 2.59722258292389397e99Initial program 9.2
if 2.59722258292389397e99 < b_2 Initial program 47.6
Taylor expanded around inf 3.0
Final simplification6.4
herbie shell --seed 2021155
(FPCore (a b_2 c)
:name "quad2m (problem 3.2.1, negative)"
:precision binary64
(/ (- (- b_2) (sqrt (- (* b_2 b_2) (* a c)))) a))