\frac{\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}\begin{array}{l}
\mathbf{if}\;b_2 \leq -3.4695905252840837 \cdot 10^{+123}:\\
\;\;\;\;-0.5 \cdot \frac{c}{b_2}\\
\mathbf{elif}\;b_2 \leq 5.980743311430165 \cdot 10^{-252}:\\
\;\;\;\;\frac{c \cdot \sqrt[3]{1}}{\sqrt{b_2 \cdot b_2 - c \cdot a} - b_2}\\
\mathbf{elif}\;b_2 \leq 5.943737817038774 \cdot 10^{+58}:\\
\;\;\;\;\frac{\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - c \cdot a}}{a}\\
\mathbf{else}:\\
\;\;\;\;-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 -3.4695905252840837e+123)
(* -0.5 (/ c b_2))
(if (<= b_2 5.980743311430165e-252)
(/ (* c (cbrt 1.0)) (- (sqrt (- (* b_2 b_2) (* c a))) b_2))
(if (<= b_2 5.943737817038774e+58)
(/ (- (- b_2) (sqrt (- (* b_2 b_2) (* c a)))) a)
(* -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 <= -3.4695905252840837e+123) {
tmp = -0.5 * (c / b_2);
} else if (b_2 <= 5.980743311430165e-252) {
tmp = (c * cbrt(1.0)) / (sqrt((b_2 * b_2) - (c * a)) - b_2);
} else if (b_2 <= 5.943737817038774e+58) {
tmp = (-b_2 - sqrt((b_2 * b_2) - (c * a))) / a;
} else {
tmp = -2.0 * (b_2 / a);
}
return tmp;
}



Bits error versus a



Bits error versus b_2



Bits error versus c
Results
if b_2 < -3.46959052528408367e123Initial program 60.3
Taylor expanded around -inf 2.0
if -3.46959052528408367e123 < b_2 < 5.980743311430165e-252Initial program 31.1
rmApplied clear-num_binary6431.2
rmApplied flip--_binary6431.2
Applied associate-/r/_binary6431.3
Applied add-cube-cbrt_binary6431.3
Applied times-frac_binary6431.3
Simplified14.7
Simplified14.7
Taylor expanded around 0 8.9
rmApplied associate-*r/_binary648.8
if 5.980743311430165e-252 < b_2 < 5.9437378170387743e58Initial program 8.9
if 5.9437378170387743e58 < b_2 Initial program 39.0
rmApplied clear-num_binary6439.1
Taylor expanded around 0 5.3
Final simplification6.7
herbie shell --seed 2020355
(FPCore (a b_2 c)
:name "quad2m (problem 3.2.1, negative)"
:precision binary64
(/ (- (- b_2) (sqrt (- (* b_2 b_2) (* a c)))) a))