\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}
\begin{array}{l}
t_0 := \mathsf{fma}\left(a, c \cdot -4, b \cdot b\right)\\
\frac{-2 \cdot c}{\mathsf{fma}\left({t_0}^{0.25}, \sqrt{\sqrt{t_0}}, b\right)}
\end{array}
(FPCore (a b c) :precision binary64 (/ (+ (- b) (sqrt (- (* b b) (* (* 4.0 a) c)))) (* 2.0 a)))
(FPCore (a b c) :precision binary64 (let* ((t_0 (fma a (* c -4.0) (* b b)))) (/ (* -2.0 c) (fma (pow t_0 0.25) (sqrt (sqrt t_0)) b))))
double code(double a, double b, double c) {
return (-b + sqrt((b * b) - ((4.0 * a) * c))) / (2.0 * a);
}
double code(double a, double b, double c) {
double t_0 = fma(a, (c * -4.0), (b * b));
return (-2.0 * c) / fma(pow(t_0, 0.25), sqrt(sqrt(t_0)), b);
}



Bits error versus a



Bits error versus b



Bits error versus c
Initial program 43.9
Simplified43.9
Applied flip--_binary6443.9
Applied associate-*l/_binary6443.9
Simplified0.4
Applied add-sqr-sqrt_binary640.5
Applied fma-def_binary640.4
Taylor expanded in c around 0 0.2
Applied pow1_binary640.2
Applied sqrt-pow1_binary640.2
Applied sqrt-pow1_binary640.2
Final simplification0.2
herbie shell --seed 2021275
(FPCore (a b c)
:name "Quadratic roots, medium range"
:precision binary64
:pre (and (and (and (< 1.1102230246251565e-16 a) (< a 9007199254740992.0)) (and (< 1.1102230246251565e-16 b) (< b 9007199254740992.0))) (and (< 1.1102230246251565e-16 c) (< c 9007199254740992.0)))
(/ (+ (- b) (sqrt (- (* b b) (* (* 4.0 a) c)))) (* 2.0 a)))