\frac{\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}\begin{array}{l}
\mathbf{if}\;b_2 \leq -1.3907884444731015 \cdot 10^{+134}:\\
\;\;\;\;-0.5 \cdot \frac{c}{b_2}\\
\mathbf{elif}\;b_2 \leq -2.45851834527593 \cdot 10^{-281}:\\
\;\;\;\;c \cdot \frac{1}{\sqrt{b_2 \cdot b_2 - c \cdot a} - b_2}\\
\mathbf{elif}\;b_2 \leq 6.79328400373391 \cdot 10^{+86}:\\
\;\;\;\;\frac{\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - c \cdot a}}{a}\\
\mathbf{else}:\\
\;\;\;\;-2 \cdot \frac{b_2}{a} + \frac{c}{b_2} \cdot 0.5\\
\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.3907884444731015e+134)
(* -0.5 (/ c b_2))
(if (<= b_2 -2.45851834527593e-281)
(* c (/ 1.0 (- (sqrt (- (* b_2 b_2) (* c a))) b_2)))
(if (<= b_2 6.79328400373391e+86)
(/ (- (- b_2) (sqrt (- (* b_2 b_2) (* c a)))) a)
(+ (* -2.0 (/ b_2 a)) (* (/ c b_2) 0.5))))))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.3907884444731015e+134) {
tmp = -0.5 * (c / b_2);
} else if (b_2 <= -2.45851834527593e-281) {
tmp = c * (1.0 / (sqrt((b_2 * b_2) - (c * a)) - b_2));
} else if (b_2 <= 6.79328400373391e+86) {
tmp = (-b_2 - sqrt((b_2 * b_2) - (c * a))) / a;
} else {
tmp = (-2.0 * (b_2 / a)) + ((c / b_2) * 0.5);
}
return tmp;
}



Bits error versus a



Bits error versus b_2



Bits error versus c
Results
if b_2 < -1.39078844447310152e134Initial program 62.3
Taylor expanded around -inf 1.5
if -1.39078844447310152e134 < b_2 < -2.45851834527592995e-281Initial program 34.5
rmApplied clear-num_binary6434.5
rmApplied flip--_binary6434.6
Applied associate-/r/_binary6434.6
Applied add-sqr-sqrt_binary6434.6
Applied times-frac_binary6434.6
Simplified14.0
Simplified14.0
Taylor expanded around 0 7.7
if -2.45851834527592995e-281 < b_2 < 6.7932840037339095e86Initial program 9.5
if 6.7932840037339095e86 < b_2 Initial program 43.8
Taylor expanded around inf 3.8
Simplified3.8
Final simplification6.3
herbie shell --seed 2021045
(FPCore (a b_2 c)
:name "quad2m (problem 3.2.1, negative)"
:precision binary64
(/ (- (- b_2) (sqrt (- (* b_2 b_2) (* a c)))) a))