?

Average Accuracy: 69.9% → 88.6%
Time: 25.8s
Precision: binary64
Cost: 38052

?

\[\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
\[\begin{array}{l} t_0 := c \cdot \left(a \cdot -4\right)\\ t_1 := \left(\frac{2 \cdot c}{\frac{b}{a}} - b\right) - b\\ t_2 := \sqrt{b \cdot b + t_0}\\ t_3 := \frac{t_2 - b}{2 \cdot a}\\ t_4 := \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - t_2}\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array}\\ t_5 := \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b + -4 \cdot \left(c \cdot a\right)}}\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array}\\ \mathbf{if}\;t_4 \leq -2 \cdot 10^{+274}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{-2}{b + \sqrt{\mathsf{fma}\left(b, b, t_0\right)}}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{hypot}\left(b, \sqrt{a \cdot -4} \cdot \sqrt{c}\right) \cdot \frac{0.5}{a} - \frac{b}{2 \cdot a}\\ \end{array}\\ \mathbf{elif}\;t_4 \leq -2 \cdot 10^{-274}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;t_4 \leq 0:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{t_1}\\ \mathbf{else}:\\ \;\;\;\;\frac{t_1}{2 \cdot a}\\ \end{array}\\ \mathbf{elif}\;t_4 \leq 2 \cdot 10^{+254}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - b}\\ \mathbf{else}:\\ \;\;\;\;\frac{b \cdot -2}{2 \cdot a}\\ \end{array} \]
(FPCore (a b c)
 :precision binary64
 (if (>= b 0.0)
   (/ (* 2.0 c) (- (- b) (sqrt (- (* b b) (* (* 4.0 a) c)))))
   (/ (+ (- b) (sqrt (- (* b b) (* (* 4.0 a) c)))) (* 2.0 a))))
(FPCore (a b c)
 :precision binary64
 (let* ((t_0 (* c (* a -4.0)))
        (t_1 (- (- (/ (* 2.0 c) (/ b a)) b) b))
        (t_2 (sqrt (+ (* b b) t_0)))
        (t_3 (/ (- t_2 b) (* 2.0 a)))
        (t_4 (if (>= b 0.0) (/ (* 2.0 c) (- (- b) t_2)) t_3))
        (t_5
         (if (>= b 0.0)
           (/ (* 2.0 c) (- (- b) (sqrt (+ (* b b) (* -4.0 (* c a))))))
           t_3)))
   (if (<= t_4 -2e+274)
     (if (>= b 0.0)
       (* c (/ -2.0 (+ b (sqrt (fma b b t_0)))))
       (-
        (* (hypot b (* (sqrt (* a -4.0)) (sqrt c))) (/ 0.5 a))
        (/ b (* 2.0 a))))
     (if (<= t_4 -2e-274)
       t_5
       (if (<= t_4 0.0)
         (if (>= b 0.0) (/ (* 2.0 c) t_1) (/ t_1 (* 2.0 a)))
         (if (<= t_4 2e+254)
           t_5
           (if (>= b 0.0)
             (/ (* 2.0 c) (- (- b) b))
             (/ (* b -2.0) (* 2.0 a)))))))))
double code(double a, double b, double c) {
	double tmp;
	if (b >= 0.0) {
		tmp = (2.0 * c) / (-b - sqrt(((b * b) - ((4.0 * a) * c))));
	} else {
		tmp = (-b + sqrt(((b * b) - ((4.0 * a) * c)))) / (2.0 * a);
	}
	return tmp;
}
double code(double a, double b, double c) {
	double t_0 = c * (a * -4.0);
	double t_1 = (((2.0 * c) / (b / a)) - b) - b;
	double t_2 = sqrt(((b * b) + t_0));
	double t_3 = (t_2 - b) / (2.0 * a);
	double tmp;
	if (b >= 0.0) {
		tmp = (2.0 * c) / (-b - t_2);
	} else {
		tmp = t_3;
	}
	double t_4 = tmp;
	double tmp_1;
	if (b >= 0.0) {
		tmp_1 = (2.0 * c) / (-b - sqrt(((b * b) + (-4.0 * (c * a)))));
	} else {
		tmp_1 = t_3;
	}
	double t_5 = tmp_1;
	double tmp_3;
	if (t_4 <= -2e+274) {
		double tmp_4;
		if (b >= 0.0) {
			tmp_4 = c * (-2.0 / (b + sqrt(fma(b, b, t_0))));
		} else {
			tmp_4 = (hypot(b, (sqrt((a * -4.0)) * sqrt(c))) * (0.5 / a)) - (b / (2.0 * a));
		}
		tmp_3 = tmp_4;
	} else if (t_4 <= -2e-274) {
		tmp_3 = t_5;
	} else if (t_4 <= 0.0) {
		double tmp_5;
		if (b >= 0.0) {
			tmp_5 = (2.0 * c) / t_1;
		} else {
			tmp_5 = t_1 / (2.0 * a);
		}
		tmp_3 = tmp_5;
	} else if (t_4 <= 2e+254) {
		tmp_3 = t_5;
	} else if (b >= 0.0) {
		tmp_3 = (2.0 * c) / (-b - b);
	} else {
		tmp_3 = (b * -2.0) / (2.0 * a);
	}
	return tmp_3;
}
function code(a, b, c)
	tmp = 0.0
	if (b >= 0.0)
		tmp = Float64(Float64(2.0 * c) / Float64(Float64(-b) - sqrt(Float64(Float64(b * b) - Float64(Float64(4.0 * a) * c)))));
	else
		tmp = Float64(Float64(Float64(-b) + sqrt(Float64(Float64(b * b) - Float64(Float64(4.0 * a) * c)))) / Float64(2.0 * a));
	end
	return tmp
end
function code(a, b, c)
	t_0 = Float64(c * Float64(a * -4.0))
	t_1 = Float64(Float64(Float64(Float64(2.0 * c) / Float64(b / a)) - b) - b)
	t_2 = sqrt(Float64(Float64(b * b) + t_0))
	t_3 = Float64(Float64(t_2 - b) / Float64(2.0 * a))
	tmp = 0.0
	if (b >= 0.0)
		tmp = Float64(Float64(2.0 * c) / Float64(Float64(-b) - t_2));
	else
		tmp = t_3;
	end
	t_4 = tmp
	tmp_1 = 0.0
	if (b >= 0.0)
		tmp_1 = Float64(Float64(2.0 * c) / Float64(Float64(-b) - sqrt(Float64(Float64(b * b) + Float64(-4.0 * Float64(c * a))))));
	else
		tmp_1 = t_3;
	end
	t_5 = tmp_1
	tmp_3 = 0.0
	if (t_4 <= -2e+274)
		tmp_4 = 0.0
		if (b >= 0.0)
			tmp_4 = Float64(c * Float64(-2.0 / Float64(b + sqrt(fma(b, b, t_0)))));
		else
			tmp_4 = Float64(Float64(hypot(b, Float64(sqrt(Float64(a * -4.0)) * sqrt(c))) * Float64(0.5 / a)) - Float64(b / Float64(2.0 * a)));
		end
		tmp_3 = tmp_4;
	elseif (t_4 <= -2e-274)
		tmp_3 = t_5;
	elseif (t_4 <= 0.0)
		tmp_5 = 0.0
		if (b >= 0.0)
			tmp_5 = Float64(Float64(2.0 * c) / t_1);
		else
			tmp_5 = Float64(t_1 / Float64(2.0 * a));
		end
		tmp_3 = tmp_5;
	elseif (t_4 <= 2e+254)
		tmp_3 = t_5;
	elseif (b >= 0.0)
		tmp_3 = Float64(Float64(2.0 * c) / Float64(Float64(-b) - b));
	else
		tmp_3 = Float64(Float64(b * -2.0) / Float64(2.0 * a));
	end
	return tmp_3
end
code[a_, b_, c_] := If[GreaterEqual[b, 0.0], 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], 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]]
code[a_, b_, c_] := Block[{t$95$0 = N[(c * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(N[(2.0 * c), $MachinePrecision] / N[(b / a), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision] - b), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(N[(b * b), $MachinePrecision] + t$95$0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(N[(t$95$2 - b), $MachinePrecision] / N[(2.0 * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = If[GreaterEqual[b, 0.0], N[(N[(2.0 * c), $MachinePrecision] / N[((-b) - t$95$2), $MachinePrecision]), $MachinePrecision], t$95$3]}, Block[{t$95$5 = If[GreaterEqual[b, 0.0], N[(N[(2.0 * c), $MachinePrecision] / N[((-b) - N[Sqrt[N[(N[(b * b), $MachinePrecision] + N[(-4.0 * N[(c * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$3]}, If[LessEqual[t$95$4, -2e+274], If[GreaterEqual[b, 0.0], N[(c * N[(-2.0 / N[(b + N[Sqrt[N[(b * b + t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[b ^ 2 + N[(N[Sqrt[N[(a * -4.0), $MachinePrecision]], $MachinePrecision] * N[Sqrt[c], $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision] * N[(0.5 / a), $MachinePrecision]), $MachinePrecision] - N[(b / N[(2.0 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], If[LessEqual[t$95$4, -2e-274], t$95$5, If[LessEqual[t$95$4, 0.0], If[GreaterEqual[b, 0.0], N[(N[(2.0 * c), $MachinePrecision] / t$95$1), $MachinePrecision], N[(t$95$1 / N[(2.0 * a), $MachinePrecision]), $MachinePrecision]], If[LessEqual[t$95$4, 2e+254], t$95$5, If[GreaterEqual[b, 0.0], N[(N[(2.0 * c), $MachinePrecision] / N[((-b) - b), $MachinePrecision]), $MachinePrecision], N[(N[(b * -2.0), $MachinePrecision] / N[(2.0 * a), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}\\

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


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

\mathbf{else}:\\
\;\;\;\;t_3\\


\end{array}\\
t_5 := \begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b + -4 \cdot \left(c \cdot a\right)}}\\

\mathbf{else}:\\
\;\;\;\;t_3\\


\end{array}\\
\mathbf{if}\;t_4 \leq -2 \cdot 10^{+274}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;c \cdot \frac{-2}{b + \sqrt{\mathsf{fma}\left(b, b, t_0\right)}}\\

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


\end{array}\\

\mathbf{elif}\;t_4 \leq -2 \cdot 10^{-274}:\\
\;\;\;\;t_5\\

\mathbf{elif}\;t_4 \leq 0:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;\frac{2 \cdot c}{t_1}\\

\mathbf{else}:\\
\;\;\;\;\frac{t_1}{2 \cdot a}\\


\end{array}\\

\mathbf{elif}\;t_4 \leq 2 \cdot 10^{+254}:\\
\;\;\;\;t_5\\

\mathbf{elif}\;b \geq 0:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) - b}\\

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


\end{array}

Error?

Derivation?

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

    1. Initial program 8.8%

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

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

      [Start]8.8

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

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

      [Start]8.8

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

      *-commutative [=>]8.8

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

      sub-neg [=>]8.8

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

      distribute-rgt-in [=>]8.8

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

      fma-udef [=>]8.8

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

      add-sqr-sqrt [=>]6.8

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

      hypot-def [=>]36.0

      \[ \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{-2}{b + \sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -4\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{hypot}\left(b, \sqrt{c \cdot \left(a \cdot -4\right)}\right) \cdot \frac{0.5}{a} + \left(-b\right) \cdot \frac{0.5}{a}\\ \end{array} \]
    4. Applied egg-rr36.0%

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

      [Start]36.0

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

      distribute-rgt-out [=>]35.8

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

      unsub-neg [=>]35.8

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

      add-sqr-sqrt [=>]1.1

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

      sqrt-unprod [=>]1.7

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

      sqr-neg [<=]1.7

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

      sqrt-unprod [<=]3.0

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

      add-sqr-sqrt [<=]2.4

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

      distribute-rgt-out-- [<=]2.4

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

      clear-num [=>]2.4

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

      un-div-inv [=>]2.7

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

      div-inv [=>]2.7

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

      metadata-eval [=>]2.7

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

      add-sqr-sqrt [=>]3.0

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

      sqrt-unprod [=>]1.8

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

      sqr-neg [=>]1.8

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

      sqrt-unprod [<=]1.1

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

      add-sqr-sqrt [<=]36.0

      \[ \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{-2}{b + \sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -4\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{\mathsf{hypot}\left(b, \sqrt{c \cdot \left(a \cdot -4\right)}\right) \cdot \frac{0.5}{a}} - \frac{b}{a \cdot 2}\\ \end{array} \]
    5. Applied egg-rr64.3%

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

      [Start]36.0

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

      sqrt-prod [=>]64.3

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

      *-commutative [=>]64.3

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

    if -1.99999999999999984e274 < (if (>=.f64 b 0) (/.f64 (*.f64 2 c) (-.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 4 a) c))))) (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 4 a) c)))) (*.f64 2 a))) < -1.99999999999999993e-274 or 0.0 < (if (>=.f64 b 0) (/.f64 (*.f64 2 c) (-.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 4 a) c))))) (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 4 a) c)))) (*.f64 2 a))) < 1.9999999999999999e254

    1. Initial program 95.7%

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

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

      [Start]95.7

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

      sub-neg [=>]95.7

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

      flip-+ [=>]74.6

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

      pow2 [=>]74.6

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

      pow2 [=>]74.6

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

      pow-sqr [=>]74.6

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

      metadata-eval [=>]74.6

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

      associate-*l* [=>]74.6

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

      distribute-lft-neg-in [=>]74.6

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

      metadata-eval [=>]74.6

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

      associate-*l* [=>]74.6

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

      distribute-lft-neg-in [=>]74.6

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

      metadata-eval [=>]74.6

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

      associate-*l* [=>]74.6

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

      distribute-lft-neg-in [=>]74.6

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

      metadata-eval [=>]74.6

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

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

      [Start]74.6

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

      sqr-pow [=>]74.6

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

      metadata-eval [=>]74.6

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

      pow2 [<=]74.6

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

      metadata-eval [=>]74.6

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

      pow2 [<=]74.6

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

      flip-+ [<=]95.7

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

      add-sqr-sqrt [=>]85.4

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

      sqrt-prod [<=]84.6

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

      swap-sqr [=>]84.5

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

      sqrt-prod [=>]84.6

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

      metadata-eval [=>]84.6

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

      metadata-eval [=>]84.6

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

      metadata-eval [<=]84.6

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

      sqrt-unprod [<=]62.0

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

      add-sqr-sqrt [<=]72.2

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

      cancel-sign-sub-inv [<=]72.2

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

      add-sqr-sqrt [=>]62.1

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

    if -1.99999999999999993e-274 < (if (>=.f64 b 0) (/.f64 (*.f64 2 c) (-.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 4 a) c))))) (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 4 a) c)))) (*.f64 2 a))) < 0.0

    1. Initial program 43.7%

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

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

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

      [Start]81.1

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

      associate-/l* [=>]83.3

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

      associate-*r/ [=>]83.3

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \left(b + \frac{-2 \cdot c}{\frac{b}{a}}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \left(2 \cdot \frac{c \cdot a}{b} + -1 \cdot b\right)}{2 \cdot a}\\ \end{array} \]
    5. Simplified83.0%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \left(b + \frac{-2 \cdot c}{\frac{b}{a}}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \left(\frac{2 \cdot c}{\frac{b}{a}} - b\right)}{2 \cdot a}\\ \end{array} \]
      Proof

      [Start]83.0

      \[ \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \left(b + \frac{-2 \cdot c}{\frac{b}{a}}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \left(2 \cdot \frac{c \cdot a}{b} + -1 \cdot b\right)}{2 \cdot a}\\ \end{array} \]

      mul-1-neg [=>]83.0

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

      unsub-neg [=>]83.0

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

      associate-/l* [=>]83.0

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

      associate-*r/ [=>]83.0

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

    if 1.9999999999999999e254 < (if (>=.f64 b 0) (/.f64 (*.f64 2 c) (-.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 4 a) c))))) (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 4 a) c)))) (*.f64 2 a)))

    1. Initial program 15.1%

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - b}\\ \mathbf{else}:\\ \;\;\;\;\frac{-2 \cdot b}{2 \cdot a}\\ \end{array} \]
    4. Simplified75.2%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - b}\\ \mathbf{else}:\\ \;\;\;\;\frac{b \cdot -2}{2 \cdot a}\\ \end{array} \]
      Proof

      [Start]75.2

      \[ \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - b}\\ \mathbf{else}:\\ \;\;\;\;\frac{-2 \cdot b}{2 \cdot a}\\ \end{array} \]

      *-commutative [=>]75.2

      \[ \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - b}\\ \mathbf{else}:\\ \;\;\;\;\frac{b \cdot -2}{2 \cdot a}\\ \end{array} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification88.6%

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

Alternatives

Alternative 1
Accuracy89.4%
Cost38052
\[\begin{array}{l} t_0 := \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - b}\\ \mathbf{else}:\\ \;\;\;\;\frac{b \cdot -2}{2 \cdot a}\\ \end{array}\\ t_1 := \sqrt{b \cdot b + c \cdot \left(a \cdot -4\right)}\\ t_2 := \frac{t_1 - b}{2 \cdot a}\\ t_3 := \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b + -4 \cdot \left(c \cdot a\right)}}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array}\\ t_4 := \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - t_1}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array}\\ t_5 := \left(\frac{2 \cdot c}{\frac{b}{a}} - b\right) - b\\ \mathbf{if}\;t_4 \leq -\infty:\\ \;\;\;\;t_0\\ \mathbf{elif}\;t_4 \leq -2 \cdot 10^{-274}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t_4 \leq 0:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{t_5}\\ \mathbf{else}:\\ \;\;\;\;\frac{t_5}{2 \cdot a}\\ \end{array}\\ \mathbf{elif}\;t_4 \leq 2 \cdot 10^{+254}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 2
Accuracy88.6%
Cost38052
\[\begin{array}{l} t_0 := c \cdot \left(a \cdot -4\right)\\ t_1 := \left(\frac{2 \cdot c}{\frac{b}{a}} - b\right) - b\\ t_2 := \sqrt{b \cdot b + t_0}\\ t_3 := \frac{t_2 - b}{2 \cdot a}\\ t_4 := \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - t_2}\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array}\\ t_5 := \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - \sqrt{b \cdot b + -4 \cdot \left(c \cdot a\right)}}\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array}\\ \mathbf{if}\;t_4 \leq -2 \cdot 10^{+274}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{-2}{b + \sqrt{\mathsf{fma}\left(b, b, t_0\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{0.5}{\frac{a}{\mathsf{hypot}\left(b, \sqrt{a \cdot -4} \cdot \sqrt{c}\right) - b}}\\ \end{array}\\ \mathbf{elif}\;t_4 \leq -2 \cdot 10^{-274}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;t_4 \leq 0:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{t_1}\\ \mathbf{else}:\\ \;\;\;\;\frac{t_1}{2 \cdot a}\\ \end{array}\\ \mathbf{elif}\;t_4 \leq 2 \cdot 10^{+254}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - b}\\ \mathbf{else}:\\ \;\;\;\;\frac{b \cdot -2}{2 \cdot a}\\ \end{array} \]
Alternative 3
Accuracy76.4%
Cost7756
\[\begin{array}{l} t_0 := \left(\frac{2 \cdot c}{\frac{b}{a}} - b\right) - b\\ \mathbf{if}\;b \leq -7.5 \cdot 10^{+98}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - b}\\ \mathbf{else}:\\ \;\;\;\;\frac{b \cdot -2}{2 \cdot a}\\ \end{array}\\ \mathbf{elif}\;b \leq 5.2 \cdot 10^{-254}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{b \cdot b + c \cdot \left(a \cdot -4\right)} - b}{2 \cdot a}\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{t_0}{2 \cdot a}\\ \end{array} \]
Alternative 4
Accuracy76.1%
Cost7624
\[\begin{array}{l} t_0 := \frac{2 \cdot c}{\left(-b\right) - b}\\ \mathbf{if}\;b \leq -7.2 \cdot 10^{+98}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{b \cdot -2}{2 \cdot a}\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{b \cdot b + c \cdot \left(a \cdot -4\right)} - b}{2 \cdot a}\\ \end{array} \]
Alternative 5
Accuracy71.0%
Cost7368
\[\begin{array}{l} t_0 := \frac{2 \cdot c}{\left(-b\right) - b}\\ \mathbf{if}\;b \leq -3.1 \cdot 10^{-88}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{b \cdot -2}{2 \cdot a}\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{c \cdot \left(a \cdot -4\right)} - b}{2 \cdot a}\\ \end{array} \]
Alternative 6
Accuracy63.4%
Cost644
\[\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - b}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} - \frac{b}{a}\\ \end{array} \]
Alternative 7
Accuracy63.4%
Cost644
\[\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - b}\\ \mathbf{else}:\\ \;\;\;\;\frac{b \cdot -2}{2 \cdot a}\\ \end{array} \]

Error

Reproduce?

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