\frac{\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}
\begin{array}{l}
\mathbf{if}\;b_2 \leq -6.619515284789695 \cdot 10^{+148}:\\
\;\;\;\;-0.5 \cdot \frac{c}{b_2}\\
\mathbf{else}:\\
\;\;\;\;\begin{array}{l}
t_0 := \sqrt{b_2 \cdot b_2 - c \cdot a}\\
\mathbf{if}\;b_2 \leq 3.794720303511745 \cdot 10^{-306}:\\
\;\;\;\;\frac{c}{t_0 - b_2}\\
\mathbf{elif}\;b_2 \leq 8.089389794080142 \cdot 10^{+92}:\\
\;\;\;\;\frac{\mathsf{fma}\left(1, -b_2, -t_0\right)}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(-b_2\right) - b_2}{a}\\
\end{array}\\
\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 -6.619515284789695e+148)
(* -0.5 (/ c b_2))
(let* ((t_0 (sqrt (- (* b_2 b_2) (* c a)))))
(if (<= b_2 3.794720303511745e-306)
(/ c (- t_0 b_2))
(if (<= b_2 8.089389794080142e+92)
(/ (fma 1.0 (- b_2) (- t_0)) a)
(/ (- (- b_2) 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 <= -6.619515284789695e+148) {
tmp = -0.5 * (c / b_2);
} else {
double t_0 = sqrt((b_2 * b_2) - (c * a));
double tmp_1;
if (b_2 <= 3.794720303511745e-306) {
tmp_1 = c / (t_0 - b_2);
} else if (b_2 <= 8.089389794080142e+92) {
tmp_1 = fma(1.0, -b_2, -t_0) / a;
} else {
tmp_1 = (-b_2 - b_2) / a;
}
tmp = tmp_1;
}
return tmp;
}



Bits error versus a



Bits error versus b_2



Bits error versus c
if b_2 < -6.6195152847896951e148Initial program 63.6
Taylor expanded in b_2 around -inf 1.7
if -6.6195152847896951e148 < b_2 < 3.79472030351174487e-306Initial program 33.9
Applied clear-num_binary6433.9
Applied flip--_binary6433.9
Applied associate-/r/_binary6433.9
Applied associate-/r*_binary6433.9
Simplified13.9
Taylor expanded in a around 0 7.8
if 3.79472030351174487e-306 < b_2 < 8.08938979408014236e92Initial program 9.4
Applied *-un-lft-identity_binary649.4
Applied fma-neg_binary649.4
if 8.08938979408014236e92 < b_2 Initial program 43.7
Taylor expanded in b_2 around inf 4.8
Final simplification6.6
herbie shell --seed 2021313
(FPCore (a b_2 c)
:name "quad2m (problem 3.2.1, negative)"
:precision binary64
(/ (- (- b_2) (sqrt (- (* b_2 b_2) (* a c)))) a))