Average Error: 20.5 → 7.0
Time: 7.9s
Precision: binary64
\[\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \end{array} \]
\[\begin{array}{l} t_0 := 4 \cdot \left(a \cdot c\right)\\ t_1 := \mathsf{fma}\left(-c, 4 \cdot a, t_0\right)\\ t_2 := \frac{b \cdot -2}{a \cdot 2}\\ t_3 := c \cdot \left(a \cdot -4\right)\\ t_4 := \sqrt{b \cdot b + t_3}\\ t_5 := \frac{\left(-b\right) - t_4}{a \cdot 2}\\ t_6 := \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;t_5\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot 2}{t_4 - b}\\ \end{array}\\ t_7 := \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;t_5\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot 2}{\sqrt{\mathsf{fma}\left(b, b, t_3\right) + \left(t_1 + t_1\right)} - b}\\ \end{array}\\ t_8 := \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot 2}{\mathsf{fma}\left(b, -2, \left(\frac{a}{b} \cdot \left(c \cdot -4\right)\right) \cdot -0.5\right)}\\ \end{array}\\ \mathbf{if}\;t_6 \leq -2 \cdot 10^{+255}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot 2}{\frac{\sqrt{{b}^{4} - {t_0}^{2}}}{\sqrt{\mathsf{fma}\left(b, b, t_0\right)}} - b}\\ \end{array}\\ \mathbf{elif}\;t_6 \leq -5 \cdot 10^{-276}:\\ \;\;\;\;t_7\\ \mathbf{elif}\;t_6 \leq 0:\\ \;\;\;\;t_8\\ \mathbf{elif}\;t_6 \leq 5 \cdot 10^{+295}:\\ \;\;\;\;t_7\\ \mathbf{else}:\\ \;\;\;\;t_8\\ \end{array} \]
(FPCore (a b c)
 :precision binary64
 (if (>= b 0.0)
   (/ (- (- b) (sqrt (- (* b b) (* (* 4.0 a) c)))) (* 2.0 a))
   (/ (* 2.0 c) (+ (- b) (sqrt (- (* b b) (* (* 4.0 a) c)))))))
(FPCore (a b c)
 :precision binary64
 (let* ((t_0 (* 4.0 (* a c)))
        (t_1 (fma (- c) (* 4.0 a) t_0))
        (t_2 (/ (* b -2.0) (* a 2.0)))
        (t_3 (* c (* a -4.0)))
        (t_4 (sqrt (+ (* b b) t_3)))
        (t_5 (/ (- (- b) t_4) (* a 2.0)))
        (t_6 (if (>= b 0.0) t_5 (/ (* c 2.0) (- t_4 b))))
        (t_7
         (if (>= b 0.0)
           t_5
           (/ (* c 2.0) (- (sqrt (+ (fma b b t_3) (+ t_1 t_1))) b))))
        (t_8
         (if (>= b 0.0)
           t_2
           (/ (* c 2.0) (fma b -2.0 (* (* (/ a b) (* c -4.0)) -0.5))))))
   (if (<= t_6 -2e+255)
     (if (>= b 0.0)
       t_2
       (/
        (* c 2.0)
        (- (/ (sqrt (- (pow b 4.0) (pow t_0 2.0))) (sqrt (fma b b t_0))) b)))
     (if (<= t_6 -5e-276)
       t_7
       (if (<= t_6 0.0) t_8 (if (<= t_6 5e+295) t_7 t_8))))))
double code(double a, double b, double c) {
	double tmp;
	if (b >= 0.0) {
		tmp = (-b - sqrt(((b * b) - ((4.0 * a) * c)))) / (2.0 * a);
	} else {
		tmp = (2.0 * c) / (-b + sqrt(((b * b) - ((4.0 * a) * c))));
	}
	return tmp;
}
double code(double a, double b, double c) {
	double t_0 = 4.0 * (a * c);
	double t_1 = fma(-c, (4.0 * a), t_0);
	double t_2 = (b * -2.0) / (a * 2.0);
	double t_3 = c * (a * -4.0);
	double t_4 = sqrt(((b * b) + t_3));
	double t_5 = (-b - t_4) / (a * 2.0);
	double tmp;
	if (b >= 0.0) {
		tmp = t_5;
	} else {
		tmp = (c * 2.0) / (t_4 - b);
	}
	double t_6 = tmp;
	double tmp_1;
	if (b >= 0.0) {
		tmp_1 = t_5;
	} else {
		tmp_1 = (c * 2.0) / (sqrt((fma(b, b, t_3) + (t_1 + t_1))) - b);
	}
	double t_7 = tmp_1;
	double tmp_2;
	if (b >= 0.0) {
		tmp_2 = t_2;
	} else {
		tmp_2 = (c * 2.0) / fma(b, -2.0, (((a / b) * (c * -4.0)) * -0.5));
	}
	double t_8 = tmp_2;
	double tmp_4;
	if (t_6 <= -2e+255) {
		double tmp_5;
		if (b >= 0.0) {
			tmp_5 = t_2;
		} else {
			tmp_5 = (c * 2.0) / ((sqrt((pow(b, 4.0) - pow(t_0, 2.0))) / sqrt(fma(b, b, t_0))) - b);
		}
		tmp_4 = tmp_5;
	} else if (t_6 <= -5e-276) {
		tmp_4 = t_7;
	} else if (t_6 <= 0.0) {
		tmp_4 = t_8;
	} else if (t_6 <= 5e+295) {
		tmp_4 = t_7;
	} else {
		tmp_4 = t_8;
	}
	return tmp_4;
}
function code(a, b, c)
	tmp = 0.0
	if (b >= 0.0)
		tmp = Float64(Float64(Float64(-b) - sqrt(Float64(Float64(b * b) - Float64(Float64(4.0 * a) * c)))) / Float64(2.0 * a));
	else
		tmp = Float64(Float64(2.0 * c) / Float64(Float64(-b) + sqrt(Float64(Float64(b * b) - Float64(Float64(4.0 * a) * c)))));
	end
	return tmp
end
function code(a, b, c)
	t_0 = Float64(4.0 * Float64(a * c))
	t_1 = fma(Float64(-c), Float64(4.0 * a), t_0)
	t_2 = Float64(Float64(b * -2.0) / Float64(a * 2.0))
	t_3 = Float64(c * Float64(a * -4.0))
	t_4 = sqrt(Float64(Float64(b * b) + t_3))
	t_5 = Float64(Float64(Float64(-b) - t_4) / Float64(a * 2.0))
	tmp = 0.0
	if (b >= 0.0)
		tmp = t_5;
	else
		tmp = Float64(Float64(c * 2.0) / Float64(t_4 - b));
	end
	t_6 = tmp
	tmp_1 = 0.0
	if (b >= 0.0)
		tmp_1 = t_5;
	else
		tmp_1 = Float64(Float64(c * 2.0) / Float64(sqrt(Float64(fma(b, b, t_3) + Float64(t_1 + t_1))) - b));
	end
	t_7 = tmp_1
	tmp_2 = 0.0
	if (b >= 0.0)
		tmp_2 = t_2;
	else
		tmp_2 = Float64(Float64(c * 2.0) / fma(b, -2.0, Float64(Float64(Float64(a / b) * Float64(c * -4.0)) * -0.5)));
	end
	t_8 = tmp_2
	tmp_4 = 0.0
	if (t_6 <= -2e+255)
		tmp_5 = 0.0
		if (b >= 0.0)
			tmp_5 = t_2;
		else
			tmp_5 = Float64(Float64(c * 2.0) / Float64(Float64(sqrt(Float64((b ^ 4.0) - (t_0 ^ 2.0))) / sqrt(fma(b, b, t_0))) - b));
		end
		tmp_4 = tmp_5;
	elseif (t_6 <= -5e-276)
		tmp_4 = t_7;
	elseif (t_6 <= 0.0)
		tmp_4 = t_8;
	elseif (t_6 <= 5e+295)
		tmp_4 = t_7;
	else
		tmp_4 = t_8;
	end
	return tmp_4
end
code[a_, b_, c_] := If[GreaterEqual[b, 0.0], N[(N[((-b) - N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(N[(4.0 * a), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(2.0 * a), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * c), $MachinePrecision] / N[((-b) + N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(N[(4.0 * a), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
code[a_, b_, c_] := Block[{t$95$0 = N[(4.0 * N[(a * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[((-c) * N[(4.0 * a), $MachinePrecision] + t$95$0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * -2.0), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(c * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[Sqrt[N[(N[(b * b), $MachinePrecision] + t$95$3), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$5 = N[(N[((-b) - t$95$4), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = If[GreaterEqual[b, 0.0], t$95$5, N[(N[(c * 2.0), $MachinePrecision] / N[(t$95$4 - b), $MachinePrecision]), $MachinePrecision]]}, Block[{t$95$7 = If[GreaterEqual[b, 0.0], t$95$5, N[(N[(c * 2.0), $MachinePrecision] / N[(N[Sqrt[N[(N[(b * b + t$95$3), $MachinePrecision] + N[(t$95$1 + t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]]}, Block[{t$95$8 = If[GreaterEqual[b, 0.0], t$95$2, N[(N[(c * 2.0), $MachinePrecision] / N[(b * -2.0 + N[(N[(N[(a / b), $MachinePrecision] * N[(c * -4.0), $MachinePrecision]), $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]}, If[LessEqual[t$95$6, -2e+255], If[GreaterEqual[b, 0.0], t$95$2, N[(N[(c * 2.0), $MachinePrecision] / N[(N[(N[Sqrt[N[(N[Power[b, 4.0], $MachinePrecision] - N[Power[t$95$0, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sqrt[N[(b * b + t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]], If[LessEqual[t$95$6, -5e-276], t$95$7, If[LessEqual[t$95$6, 0.0], t$95$8, If[LessEqual[t$95$6, 5e+295], t$95$7, t$95$8]]]]]]]]]]]]]
\begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;\frac{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\

\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\


\end{array}
\begin{array}{l}
t_0 := 4 \cdot \left(a \cdot c\right)\\
t_1 := \mathsf{fma}\left(-c, 4 \cdot a, t_0\right)\\
t_2 := \frac{b \cdot -2}{a \cdot 2}\\
t_3 := c \cdot \left(a \cdot -4\right)\\
t_4 := \sqrt{b \cdot b + t_3}\\
t_5 := \frac{\left(-b\right) - t_4}{a \cdot 2}\\
t_6 := \begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;t_5\\

\mathbf{else}:\\
\;\;\;\;\frac{c \cdot 2}{t_4 - b}\\


\end{array}\\
t_7 := \begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;t_5\\

\mathbf{else}:\\
\;\;\;\;\frac{c \cdot 2}{\sqrt{\mathsf{fma}\left(b, b, t_3\right) + \left(t_1 + t_1\right)} - b}\\


\end{array}\\
t_8 := \begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;t_2\\

\mathbf{else}:\\
\;\;\;\;\frac{c \cdot 2}{\mathsf{fma}\left(b, -2, \left(\frac{a}{b} \cdot \left(c \cdot -4\right)\right) \cdot -0.5\right)}\\


\end{array}\\
\mathbf{if}\;t_6 \leq -2 \cdot 10^{+255}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;t_2\\

\mathbf{else}:\\
\;\;\;\;\frac{c \cdot 2}{\frac{\sqrt{{b}^{4} - {t_0}^{2}}}{\sqrt{\mathsf{fma}\left(b, b, t_0\right)}} - b}\\


\end{array}\\

\mathbf{elif}\;t_6 \leq -5 \cdot 10^{-276}:\\
\;\;\;\;t_7\\

\mathbf{elif}\;t_6 \leq 0:\\
\;\;\;\;t_8\\

\mathbf{elif}\;t_6 \leq 5 \cdot 10^{+295}:\\
\;\;\;\;t_7\\

\mathbf{else}:\\
\;\;\;\;t_8\\


\end{array}

Error

Derivation

  1. Split input into 3 regimes
  2. if (if (>=.f64 b 0) (/.f64 (-.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 4 a) c)))) (*.f64 2 a)) (/.f64 (*.f64 2 c) (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 4 a) c)))))) < -1.99999999999999998e255

    1. Initial program 54.4

      \[\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \end{array} \]
    2. Taylor expanded in b around inf 16.0

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{\color{blue}{-2 \cdot b}}{2 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \end{array} \]
    3. Applied egg-rr17.2

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{-2 \cdot b}{2 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\color{blue}{\left(-b\right) + \frac{\sqrt{{b}^{4} - {\left(4 \cdot \left(a \cdot c\right)\right)}^{2}}}{\sqrt{\mathsf{fma}\left(b, b, 4 \cdot \left(a \cdot c\right)\right)}}}}\\ \end{array} \]

    if -1.99999999999999998e255 < (if (>=.f64 b 0) (/.f64 (-.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 4 a) c)))) (*.f64 2 a)) (/.f64 (*.f64 2 c) (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 4 a) c)))))) < -4.99999999999999967e-276 or -0.0 < (if (>=.f64 b 0) (/.f64 (-.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 4 a) c)))) (*.f64 2 a)) (/.f64 (*.f64 2 c) (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 4 a) c)))))) < 4.99999999999999991e295

    1. Initial program 2.6

      \[\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \end{array} \]
    2. Applied egg-rr2.6

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\color{blue}{\left(-b\right)} + \sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -4\right)\right) + \left(\mathsf{fma}\left(-c, 4 \cdot a, 4 \cdot \left(a \cdot c\right)\right) + \mathsf{fma}\left(-c, 4 \cdot a, 4 \cdot \left(a \cdot c\right)\right)\right)}}\\ \end{array} \]

    if -4.99999999999999967e-276 < (if (>=.f64 b 0) (/.f64 (-.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 4 a) c)))) (*.f64 2 a)) (/.f64 (*.f64 2 c) (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 4 a) c)))))) < -0.0 or 4.99999999999999991e295 < (if (>=.f64 b 0) (/.f64 (-.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 4 a) c)))) (*.f64 2 a)) (/.f64 (*.f64 2 c) (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 4 a) c))))))

    1. Initial program 44.1

      \[\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \end{array} \]
    2. Taylor expanded in b around inf 32.8

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{\color{blue}{-2 \cdot b}}{2 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \end{array} \]
    3. Applied egg-rr33.2

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{-2 \cdot b}{2 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\color{blue}{\left(-b\right)} + \sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -4\right)\right) + \left(\mathsf{fma}\left(-c, 4 \cdot a, 4 \cdot \left(a \cdot c\right)\right) + \mathsf{fma}\left(-c, 4 \cdot a, 4 \cdot \left(a \cdot c\right)\right)\right)}}\\ \end{array} \]
    4. Taylor expanded in b around -inf 15.7

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{-2 \cdot b}{2 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{\frac{2 \cdot c}{-2 \cdot b + -0.5 \cdot \frac{2 \cdot \left(-4 \cdot \left(c \cdot a\right) + 4 \cdot \left(c \cdot a\right)\right) + -4 \cdot \left(c \cdot a\right)}{b}}}\\ \end{array} \]
    5. Simplified12.3

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{-2 \cdot b}{2 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{\frac{2 \cdot c}{\mathsf{fma}\left(b, -2, \left(\frac{a}{b} \cdot \left(c \cdot -4\right)\right) \cdot -0.5\right)}}\\ \end{array} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification7.0

    \[\leadsto \begin{array}{l} \mathbf{if}\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{\left(-b\right) - \sqrt{b \cdot b + c \cdot \left(a \cdot -4\right)}}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot 2}{\sqrt{b \cdot b + c \cdot \left(a \cdot -4\right)} - b}\\ \end{array} \leq -2 \cdot 10^{+255}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b \cdot -2}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot 2}{\frac{\sqrt{{b}^{4} - {\left(4 \cdot \left(a \cdot c\right)\right)}^{2}}}{\sqrt{\mathsf{fma}\left(b, b, 4 \cdot \left(a \cdot c\right)\right)}} - b}\\ \end{array}\\ \mathbf{elif}\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{\left(-b\right) - \sqrt{b \cdot b + c \cdot \left(a \cdot -4\right)}}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot 2}{\sqrt{b \cdot b + c \cdot \left(a \cdot -4\right)} - b}\\ \end{array} \leq -5 \cdot 10^{-276}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{\left(-b\right) - \sqrt{b \cdot b + c \cdot \left(a \cdot -4\right)}}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot 2}{\sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -4\right)\right) + \left(\mathsf{fma}\left(-c, 4 \cdot a, 4 \cdot \left(a \cdot c\right)\right) + \mathsf{fma}\left(-c, 4 \cdot a, 4 \cdot \left(a \cdot c\right)\right)\right)} - b}\\ \end{array}\\ \mathbf{elif}\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{\left(-b\right) - \sqrt{b \cdot b + c \cdot \left(a \cdot -4\right)}}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot 2}{\sqrt{b \cdot b + c \cdot \left(a \cdot -4\right)} - b}\\ \end{array} \leq 0:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b \cdot -2}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot 2}{\mathsf{fma}\left(b, -2, \left(\frac{a}{b} \cdot \left(c \cdot -4\right)\right) \cdot -0.5\right)}\\ \end{array}\\ \mathbf{elif}\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{\left(-b\right) - \sqrt{b \cdot b + c \cdot \left(a \cdot -4\right)}}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot 2}{\sqrt{b \cdot b + c \cdot \left(a \cdot -4\right)} - b}\\ \end{array} \leq 5 \cdot 10^{+295}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{\left(-b\right) - \sqrt{b \cdot b + c \cdot \left(a \cdot -4\right)}}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot 2}{\sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -4\right)\right) + \left(\mathsf{fma}\left(-c, 4 \cdot a, 4 \cdot \left(a \cdot c\right)\right) + \mathsf{fma}\left(-c, 4 \cdot a, 4 \cdot \left(a \cdot c\right)\right)\right)} - b}\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;\frac{b \cdot -2}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot 2}{\mathsf{fma}\left(b, -2, \left(\frac{a}{b} \cdot \left(c \cdot -4\right)\right) \cdot -0.5\right)}\\ \end{array} \]

Reproduce

herbie shell --seed 2022211 
(FPCore (a b c)
  :name "jeff quadratic root 1"
  :precision binary64
  (if (>= b 0.0) (/ (- (- b) (sqrt (- (* b b) (* (* 4.0 a) c)))) (* 2.0 a)) (/ (* 2.0 c) (+ (- b) (sqrt (- (* b b) (* (* 4.0 a) c)))))))