?

Average Error: 31.05% → 9.94%
Time: 23.2s
Precision: binary64
Cost: 38756

?

\[\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 := \frac{-c}{b}\\ t_1 := -4 \cdot \left(a \cdot c\right)\\ t_2 := c \cdot \left(a \cdot -4\right)\\ t_3 := \sqrt{b \cdot b + t_1}\\ t_4 := \frac{\left(-b\right) - t_3}{a \cdot 2}\\ t_5 := \sqrt{b \cdot b + t_2}\\ t_6 := \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{\left(-b\right) - t_5}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot 2}{t_5 - b}\\ \end{array}\\ t_7 := \frac{\left(-b\right) - b}{a \cdot 2}\\ \mathbf{if}\;t_6 \leq -\infty:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;t_7\\ \mathbf{else}:\\ \;\;\;\;\frac{-b}{a}\\ \end{array}\\ \mathbf{elif}\;t_6 \leq -1 \cdot 10^{-275}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;t_4\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot 2}{t_3 - b}\\ \end{array}\\ \mathbf{elif}\;t_6 \leq 0:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{\left(-b\right) - \sqrt{t_2}}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array}\\ \mathbf{elif}\;t_6 \leq 10^{+290}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;t_4\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot 2}{\sqrt{4 \cdot \left(a \cdot c\right) + \left(\left(b \cdot b + a \cdot \left(c \cdot -4\right)\right) + t_1\right)} - b}\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;t_7\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \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 (/ (- c) b))
        (t_1 (* -4.0 (* a c)))
        (t_2 (* c (* a -4.0)))
        (t_3 (sqrt (+ (* b b) t_1)))
        (t_4 (/ (- (- b) t_3) (* a 2.0)))
        (t_5 (sqrt (+ (* b b) t_2)))
        (t_6
         (if (>= b 0.0) (/ (- (- b) t_5) (* a 2.0)) (/ (* c 2.0) (- t_5 b))))
        (t_7 (/ (- (- b) b) (* a 2.0))))
   (if (<= t_6 (- INFINITY))
     (if (>= b 0.0) t_7 (/ (- b) a))
     (if (<= t_6 -1e-275)
       (if (>= b 0.0) t_4 (/ (* c 2.0) (- t_3 b)))
       (if (<= t_6 0.0)
         (if (>= b 0.0) (/ (- (- b) (sqrt t_2)) (* a 2.0)) t_0)
         (if (<= t_6 1e+290)
           (if (>= b 0.0)
             t_4
             (/
              (* c 2.0)
              (-
               (sqrt (+ (* 4.0 (* a c)) (+ (+ (* b b) (* a (* c -4.0))) t_1)))
               b)))
           (if (>= b 0.0) t_7 t_0)))))))
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 = -c / b;
	double t_1 = -4.0 * (a * c);
	double t_2 = c * (a * -4.0);
	double t_3 = sqrt(((b * b) + t_1));
	double t_4 = (-b - t_3) / (a * 2.0);
	double t_5 = sqrt(((b * b) + t_2));
	double tmp;
	if (b >= 0.0) {
		tmp = (-b - t_5) / (a * 2.0);
	} else {
		tmp = (c * 2.0) / (t_5 - b);
	}
	double t_6 = tmp;
	double t_7 = (-b - b) / (a * 2.0);
	double tmp_2;
	if (t_6 <= -((double) INFINITY)) {
		double tmp_3;
		if (b >= 0.0) {
			tmp_3 = t_7;
		} else {
			tmp_3 = -b / a;
		}
		tmp_2 = tmp_3;
	} else if (t_6 <= -1e-275) {
		double tmp_4;
		if (b >= 0.0) {
			tmp_4 = t_4;
		} else {
			tmp_4 = (c * 2.0) / (t_3 - b);
		}
		tmp_2 = tmp_4;
	} else if (t_6 <= 0.0) {
		double tmp_5;
		if (b >= 0.0) {
			tmp_5 = (-b - sqrt(t_2)) / (a * 2.0);
		} else {
			tmp_5 = t_0;
		}
		tmp_2 = tmp_5;
	} else if (t_6 <= 1e+290) {
		double tmp_6;
		if (b >= 0.0) {
			tmp_6 = t_4;
		} else {
			tmp_6 = (c * 2.0) / (sqrt(((4.0 * (a * c)) + (((b * b) + (a * (c * -4.0))) + t_1))) - b);
		}
		tmp_2 = tmp_6;
	} else if (b >= 0.0) {
		tmp_2 = t_7;
	} else {
		tmp_2 = t_0;
	}
	return tmp_2;
}
public static double code(double a, double b, double c) {
	double tmp;
	if (b >= 0.0) {
		tmp = (-b - Math.sqrt(((b * b) - ((4.0 * a) * c)))) / (2.0 * a);
	} else {
		tmp = (2.0 * c) / (-b + Math.sqrt(((b * b) - ((4.0 * a) * c))));
	}
	return tmp;
}
public static double code(double a, double b, double c) {
	double t_0 = -c / b;
	double t_1 = -4.0 * (a * c);
	double t_2 = c * (a * -4.0);
	double t_3 = Math.sqrt(((b * b) + t_1));
	double t_4 = (-b - t_3) / (a * 2.0);
	double t_5 = Math.sqrt(((b * b) + t_2));
	double tmp;
	if (b >= 0.0) {
		tmp = (-b - t_5) / (a * 2.0);
	} else {
		tmp = (c * 2.0) / (t_5 - b);
	}
	double t_6 = tmp;
	double t_7 = (-b - b) / (a * 2.0);
	double tmp_2;
	if (t_6 <= -Double.POSITIVE_INFINITY) {
		double tmp_3;
		if (b >= 0.0) {
			tmp_3 = t_7;
		} else {
			tmp_3 = -b / a;
		}
		tmp_2 = tmp_3;
	} else if (t_6 <= -1e-275) {
		double tmp_4;
		if (b >= 0.0) {
			tmp_4 = t_4;
		} else {
			tmp_4 = (c * 2.0) / (t_3 - b);
		}
		tmp_2 = tmp_4;
	} else if (t_6 <= 0.0) {
		double tmp_5;
		if (b >= 0.0) {
			tmp_5 = (-b - Math.sqrt(t_2)) / (a * 2.0);
		} else {
			tmp_5 = t_0;
		}
		tmp_2 = tmp_5;
	} else if (t_6 <= 1e+290) {
		double tmp_6;
		if (b >= 0.0) {
			tmp_6 = t_4;
		} else {
			tmp_6 = (c * 2.0) / (Math.sqrt(((4.0 * (a * c)) + (((b * b) + (a * (c * -4.0))) + t_1))) - b);
		}
		tmp_2 = tmp_6;
	} else if (b >= 0.0) {
		tmp_2 = t_7;
	} else {
		tmp_2 = t_0;
	}
	return tmp_2;
}
def code(a, b, c):
	tmp = 0
	if b >= 0.0:
		tmp = (-b - math.sqrt(((b * b) - ((4.0 * a) * c)))) / (2.0 * a)
	else:
		tmp = (2.0 * c) / (-b + math.sqrt(((b * b) - ((4.0 * a) * c))))
	return tmp
def code(a, b, c):
	t_0 = -c / b
	t_1 = -4.0 * (a * c)
	t_2 = c * (a * -4.0)
	t_3 = math.sqrt(((b * b) + t_1))
	t_4 = (-b - t_3) / (a * 2.0)
	t_5 = math.sqrt(((b * b) + t_2))
	tmp = 0
	if b >= 0.0:
		tmp = (-b - t_5) / (a * 2.0)
	else:
		tmp = (c * 2.0) / (t_5 - b)
	t_6 = tmp
	t_7 = (-b - b) / (a * 2.0)
	tmp_2 = 0
	if t_6 <= -math.inf:
		tmp_3 = 0
		if b >= 0.0:
			tmp_3 = t_7
		else:
			tmp_3 = -b / a
		tmp_2 = tmp_3
	elif t_6 <= -1e-275:
		tmp_4 = 0
		if b >= 0.0:
			tmp_4 = t_4
		else:
			tmp_4 = (c * 2.0) / (t_3 - b)
		tmp_2 = tmp_4
	elif t_6 <= 0.0:
		tmp_5 = 0
		if b >= 0.0:
			tmp_5 = (-b - math.sqrt(t_2)) / (a * 2.0)
		else:
			tmp_5 = t_0
		tmp_2 = tmp_5
	elif t_6 <= 1e+290:
		tmp_6 = 0
		if b >= 0.0:
			tmp_6 = t_4
		else:
			tmp_6 = (c * 2.0) / (math.sqrt(((4.0 * (a * c)) + (((b * b) + (a * (c * -4.0))) + t_1))) - b)
		tmp_2 = tmp_6
	elif b >= 0.0:
		tmp_2 = t_7
	else:
		tmp_2 = t_0
	return tmp_2
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(Float64(-c) / b)
	t_1 = Float64(-4.0 * Float64(a * c))
	t_2 = Float64(c * Float64(a * -4.0))
	t_3 = sqrt(Float64(Float64(b * b) + t_1))
	t_4 = Float64(Float64(Float64(-b) - t_3) / Float64(a * 2.0))
	t_5 = sqrt(Float64(Float64(b * b) + t_2))
	tmp = 0.0
	if (b >= 0.0)
		tmp = Float64(Float64(Float64(-b) - t_5) / Float64(a * 2.0));
	else
		tmp = Float64(Float64(c * 2.0) / Float64(t_5 - b));
	end
	t_6 = tmp
	t_7 = Float64(Float64(Float64(-b) - b) / Float64(a * 2.0))
	tmp_2 = 0.0
	if (t_6 <= Float64(-Inf))
		tmp_3 = 0.0
		if (b >= 0.0)
			tmp_3 = t_7;
		else
			tmp_3 = Float64(Float64(-b) / a);
		end
		tmp_2 = tmp_3;
	elseif (t_6 <= -1e-275)
		tmp_4 = 0.0
		if (b >= 0.0)
			tmp_4 = t_4;
		else
			tmp_4 = Float64(Float64(c * 2.0) / Float64(t_3 - b));
		end
		tmp_2 = tmp_4;
	elseif (t_6 <= 0.0)
		tmp_5 = 0.0
		if (b >= 0.0)
			tmp_5 = Float64(Float64(Float64(-b) - sqrt(t_2)) / Float64(a * 2.0));
		else
			tmp_5 = t_0;
		end
		tmp_2 = tmp_5;
	elseif (t_6 <= 1e+290)
		tmp_6 = 0.0
		if (b >= 0.0)
			tmp_6 = t_4;
		else
			tmp_6 = Float64(Float64(c * 2.0) / Float64(sqrt(Float64(Float64(4.0 * Float64(a * c)) + Float64(Float64(Float64(b * b) + Float64(a * Float64(c * -4.0))) + t_1))) - b));
		end
		tmp_2 = tmp_6;
	elseif (b >= 0.0)
		tmp_2 = t_7;
	else
		tmp_2 = t_0;
	end
	return tmp_2
end
function tmp_2 = code(a, b, c)
	tmp = 0.0;
	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))));
	end
	tmp_2 = tmp;
end
function tmp_8 = code(a, b, c)
	t_0 = -c / b;
	t_1 = -4.0 * (a * c);
	t_2 = c * (a * -4.0);
	t_3 = sqrt(((b * b) + t_1));
	t_4 = (-b - t_3) / (a * 2.0);
	t_5 = sqrt(((b * b) + t_2));
	tmp = 0.0;
	if (b >= 0.0)
		tmp = (-b - t_5) / (a * 2.0);
	else
		tmp = (c * 2.0) / (t_5 - b);
	end
	t_6 = tmp;
	t_7 = (-b - b) / (a * 2.0);
	tmp_3 = 0.0;
	if (t_6 <= -Inf)
		tmp_4 = 0.0;
		if (b >= 0.0)
			tmp_4 = t_7;
		else
			tmp_4 = -b / a;
		end
		tmp_3 = tmp_4;
	elseif (t_6 <= -1e-275)
		tmp_5 = 0.0;
		if (b >= 0.0)
			tmp_5 = t_4;
		else
			tmp_5 = (c * 2.0) / (t_3 - b);
		end
		tmp_3 = tmp_5;
	elseif (t_6 <= 0.0)
		tmp_6 = 0.0;
		if (b >= 0.0)
			tmp_6 = (-b - sqrt(t_2)) / (a * 2.0);
		else
			tmp_6 = t_0;
		end
		tmp_3 = tmp_6;
	elseif (t_6 <= 1e+290)
		tmp_7 = 0.0;
		if (b >= 0.0)
			tmp_7 = t_4;
		else
			tmp_7 = (c * 2.0) / (sqrt(((4.0 * (a * c)) + (((b * b) + (a * (c * -4.0))) + t_1))) - b);
		end
		tmp_3 = tmp_7;
	elseif (b >= 0.0)
		tmp_3 = t_7;
	else
		tmp_3 = t_0;
	end
	tmp_8 = tmp_3;
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[((-c) / b), $MachinePrecision]}, Block[{t$95$1 = N[(-4.0 * N[(a * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(c * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(N[(b * b), $MachinePrecision] + t$95$1), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[(N[((-b) - t$95$3), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[Sqrt[N[(N[(b * b), $MachinePrecision] + t$95$2), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$6 = If[GreaterEqual[b, 0.0], N[(N[((-b) - t$95$5), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision], N[(N[(c * 2.0), $MachinePrecision] / N[(t$95$5 - b), $MachinePrecision]), $MachinePrecision]]}, Block[{t$95$7 = N[(N[((-b) - b), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$6, (-Infinity)], If[GreaterEqual[b, 0.0], t$95$7, N[((-b) / a), $MachinePrecision]], If[LessEqual[t$95$6, -1e-275], If[GreaterEqual[b, 0.0], t$95$4, N[(N[(c * 2.0), $MachinePrecision] / N[(t$95$3 - b), $MachinePrecision]), $MachinePrecision]], If[LessEqual[t$95$6, 0.0], If[GreaterEqual[b, 0.0], N[(N[((-b) - N[Sqrt[t$95$2], $MachinePrecision]), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision], t$95$0], If[LessEqual[t$95$6, 1e+290], If[GreaterEqual[b, 0.0], t$95$4, N[(N[(c * 2.0), $MachinePrecision] / N[(N[Sqrt[N[(N[(4.0 * N[(a * c), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(b * b), $MachinePrecision] + N[(a * N[(c * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]], If[GreaterEqual[b, 0.0], t$95$7, t$95$0]]]]]]]]]]]]]
\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 := \frac{-c}{b}\\
t_1 := -4 \cdot \left(a \cdot c\right)\\
t_2 := c \cdot \left(a \cdot -4\right)\\
t_3 := \sqrt{b \cdot b + t_1}\\
t_4 := \frac{\left(-b\right) - t_3}{a \cdot 2}\\
t_5 := \sqrt{b \cdot b + t_2}\\
t_6 := \begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;\frac{\left(-b\right) - t_5}{a \cdot 2}\\

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


\end{array}\\
t_7 := \frac{\left(-b\right) - b}{a \cdot 2}\\
\mathbf{if}\;t_6 \leq -\infty:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;t_7\\

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


\end{array}\\

\mathbf{elif}\;t_6 \leq -1 \cdot 10^{-275}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;t_4\\

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


\end{array}\\

\mathbf{elif}\;t_6 \leq 0:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;\frac{\left(-b\right) - \sqrt{t_2}}{a \cdot 2}\\

\mathbf{else}:\\
\;\;\;\;t_0\\


\end{array}\\

\mathbf{elif}\;t_6 \leq 10^{+290}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;t_4\\

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


\end{array}\\

\mathbf{elif}\;b \geq 0:\\
\;\;\;\;t_7\\

\mathbf{else}:\\
\;\;\;\;t_0\\


\end{array}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

  1. Split input into 5 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)))))) < -inf.0

    1. Initial program 100

      \[\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. Simplified100

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

      [Start]100

      \[ \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} \]

      associate-*l* [=>]100

      \[ \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{\left(-b\right) - \sqrt{b \cdot b - \color{blue}{4 \cdot \left(a \cdot c\right)}}}{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} \]

      *-commutative [=>]100

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

      *-commutative [=>]100

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

      associate-*l* [=>]100

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

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

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

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

      [Start]25.92

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

      mul-1-neg [=>]25.92

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

      distribute-neg-frac [=>]25.92

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

    if -inf.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)))))) < -9.99999999999999934e-276

    1. Initial program 3.63

      \[\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. Simplified3.63

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

      [Start]3.63

      \[ \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} \]

      associate-*l* [=>]3.63

      \[ \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{\left(-b\right) - \sqrt{b \cdot b - \color{blue}{4 \cdot \left(a \cdot c\right)}}}{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} \]

      *-commutative [=>]3.63

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

      *-commutative [=>]3.63

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

      associate-*l* [=>]3.63

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

    if -9.99999999999999934e-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

    1. Initial program 57.91

      \[\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. Simplified57.86

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

      [Start]57.91

      \[ \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} \]

      associate-*l* [=>]57.91

      \[ \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{\left(-b\right) - \sqrt{b \cdot b - \color{blue}{4 \cdot \left(a \cdot c\right)}}}{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} \]

      *-commutative [=>]57.91

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

      *-commutative [=>]57.91

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

      associate-*l* [=>]57.86

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

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

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

      [Start]18.85

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

      fma-def [=>]18.85

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

      associate-/l* [=>]15.53

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

      mul-1-neg [=>]15.53

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

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

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

      [Start]15.53

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

      *-commutative [<=]15.53

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

      *-commutative [<=]15.53

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

      *-commutative [=>]15.53

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

      associate-*l* [=>]15.53

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

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

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

      [Start]15.64

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

      associate-*r/ [=>]15.64

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

      neg-mul-1 [<=]15.64

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

    if -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)))))) < 1.00000000000000006e290

    1. Initial program 4.18

      \[\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. Simplified4.19

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

      [Start]4.18

      \[ \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} \]

      associate-*l* [=>]4.19

      \[ \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{\left(-b\right) - \sqrt{b \cdot b - \color{blue}{4 \cdot \left(a \cdot c\right)}}}{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} \]

      *-commutative [=>]4.19

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

      *-commutative [=>]4.19

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

      associate-*l* [=>]4.19

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

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

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

    if 1.00000000000000006e290 < (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 96.58

      \[\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. Simplified96.27

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

      [Start]96.58

      \[ \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} \]

      associate-*l* [=>]96.42

      \[ \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{\left(-b\right) - \sqrt{b \cdot b - \color{blue}{4 \cdot \left(a \cdot c\right)}}}{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} \]

      *-commutative [=>]96.42

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

      *-commutative [=>]96.42

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

      associate-*l* [=>]96.27

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

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

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

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

      [Start]24.74

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

      mul-1-neg [=>]24.74

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

      distribute-neg-frac [=>]24.74

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

    \[\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 -\infty:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{\left(-b\right) - b}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{-b}{a}\\ \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 -1 \cdot 10^{-275}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{\left(-b\right) - \sqrt{b \cdot b + -4 \cdot \left(a \cdot c\right)}}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot 2}{\sqrt{b \cdot b + -4 \cdot \left(a \cdot c\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{\left(-b\right) - \sqrt{c \cdot \left(a \cdot -4\right)}}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{-c}{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 10^{+290}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{\left(-b\right) - \sqrt{b \cdot b + -4 \cdot \left(a \cdot c\right)}}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot 2}{\sqrt{4 \cdot \left(a \cdot c\right) + \left(\left(b \cdot b + a \cdot \left(c \cdot -4\right)\right) + -4 \cdot \left(a \cdot c\right)\right)} - b}\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;\frac{\left(-b\right) - b}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{-c}{b}\\ \end{array} \]

Alternatives

Alternative 1
Error9.94%
Cost38052
\[\begin{array}{l} t_0 := \frac{-c}{b}\\ t_1 := c \cdot \left(a \cdot -4\right)\\ t_2 := \sqrt{b \cdot b + -4 \cdot \left(a \cdot c\right)}\\ t_3 := \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{\left(-b\right) - t_2}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot 2}{t_2 - b}\\ \end{array}\\ t_4 := \sqrt{b \cdot b + t_1}\\ t_5 := \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{\left(-b\right) - t_4}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot 2}{t_4 - b}\\ \end{array}\\ t_6 := \frac{\left(-b\right) - b}{a \cdot 2}\\ \mathbf{if}\;t_5 \leq -\infty:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;t_6\\ \mathbf{else}:\\ \;\;\;\;\frac{-b}{a}\\ \end{array}\\ \mathbf{elif}\;t_5 \leq -1 \cdot 10^{-275}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t_5 \leq 0:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{\left(-b\right) - \sqrt{t_1}}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array}\\ \mathbf{elif}\;t_5 \leq 10^{+290}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;t_6\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 2
Error10.05%
Cost7952
\[\begin{array}{l} t_0 := \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{\left(-b\right) - b}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{-c}{b}\\ \end{array}\\ t_1 := \sqrt{b \cdot b + -4 \cdot \left(a \cdot c\right)}\\ \mathbf{if}\;b \leq -1.6 \cdot 10^{+153}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;b \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{c}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot 2}{t_1 - b}\\ \end{array}\\ \mathbf{elif}\;b \leq 5.2 \cdot 10^{+113}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{\left(-b\right) - t_1}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{a}\\ \end{array}\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 3
Error15.64%
Cost7888
\[\begin{array}{l} t_0 := \frac{\left(-b\right) - b}{a \cdot 2}\\ t_1 := \sqrt{c \cdot \left(a \cdot -4\right)}\\ \mathbf{if}\;b \leq -6.2 \cdot 10^{-115}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{-0.5}{a} \cdot \left(b + t_1\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot -2}{-2 \cdot \left(a \cdot \frac{c}{b}\right) + b \cdot 2}\\ \end{array}\\ \mathbf{elif}\;b \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot 2}{t_1 - b}\\ \end{array}\\ \mathbf{elif}\;b \leq 7 \cdot 10^{+113}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{-0.5}{a} \cdot \left(b + \sqrt{b \cdot b + a \cdot \left(c \cdot -4\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;c \cdot \frac{2}{\mathsf{fma}\left(2, \frac{c}{\frac{b}{a}}, b \cdot -2\right)}\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{-c}{b}\\ \end{array} \]
Alternative 4
Error15.63%
Cost7888
\[\begin{array}{l} t_0 := \frac{c}{\frac{b}{a}}\\ t_1 := \sqrt{c \cdot \left(a \cdot -4\right)}\\ t_2 := \frac{\left(-b\right) - b}{a \cdot 2}\\ \mathbf{if}\;b \leq -6.3 \cdot 10^{-115}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{\left(-b\right) - t_1}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot 2}{\mathsf{fma}\left(2, t_0, -b\right) - b}\\ \end{array}\\ \mathbf{elif}\;b \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot 2}{t_1 - b}\\ \end{array}\\ \mathbf{elif}\;b \leq 6 \cdot 10^{+113}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{-0.5}{a} \cdot \left(b + \sqrt{b \cdot b + a \cdot \left(c \cdot -4\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;c \cdot \frac{2}{\mathsf{fma}\left(2, t_0, b \cdot -2\right)}\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\frac{-c}{b}\\ \end{array} \]
Alternative 5
Error10.13%
Cost7888
\[\begin{array}{l} t_0 := \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{\left(-b\right) - b}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{-c}{b}\\ \end{array}\\ \mathbf{if}\;b \leq -4.2 \cdot 10^{+147}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;b \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{c}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot 2}{\sqrt{b \cdot b + -4 \cdot \left(a \cdot c\right)} - b}\\ \end{array}\\ \mathbf{elif}\;b \leq 1.45 \cdot 10^{+113}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{-0.5}{a} \cdot \left(b + \sqrt{b \cdot b + a \cdot \left(c \cdot -4\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;c \cdot \frac{2}{\mathsf{fma}\left(2, \frac{c}{\frac{b}{a}}, b \cdot -2\right)}\\ \end{array}\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 6
Error21.14%
Cost7760
\[\begin{array}{l} t_0 := \sqrt{c \cdot \left(a \cdot -4\right)}\\ \mathbf{if}\;b \leq -6.3 \cdot 10^{-115}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{-0.5}{a} \cdot \left(b + t_0\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot -2}{-2 \cdot \left(a \cdot \frac{c}{b}\right) + b \cdot 2}\\ \end{array}\\ \mathbf{elif}\;b \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{\left(-b\right) - b}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot 2}{t_0 - b}\\ \end{array}\\ \mathbf{elif}\;b \leq 1.15 \cdot 10^{-99}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{\left(-b\right) - t_0}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{-c}{b}\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;\frac{\mathsf{fma}\left(2, \frac{c}{\frac{b}{a}}, b \cdot -2\right)}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot 2}{\left(2 \cdot \frac{a \cdot c}{b} - b\right) - b}\\ \end{array} \]
Alternative 7
Error21.16%
Cost7696
\[\begin{array}{l} t_0 := \frac{\left(-b\right) - b}{a \cdot 2}\\ t_1 := \frac{-c}{b}\\ t_2 := \sqrt{c \cdot \left(a \cdot -4\right)}\\ \mathbf{if}\;b \leq -6.3 \cdot 10^{-115}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{-0.5}{a} \cdot \left(b + t_2\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot -2}{-2 \cdot \left(a \cdot \frac{c}{b}\right) + b \cdot 2}\\ \end{array}\\ \mathbf{elif}\;b \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot 2}{t_2 - b}\\ \end{array}\\ \mathbf{elif}\;b \leq 8 \cdot 10^{-101}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{\left(-b\right) - t_2}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 8
Error21.18%
Cost7632
\[\begin{array}{l} t_0 := \frac{\left(-b\right) - b}{a \cdot 2}\\ t_1 := \sqrt{c \cdot \left(a \cdot -4\right)}\\ t_2 := \frac{-0.5}{a} \cdot \left(b + t_1\right)\\ \mathbf{if}\;b \leq -6.3 \cdot 10^{-115}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot -2}{-2 \cdot \left(a \cdot \frac{c}{b}\right) + b \cdot 2}\\ \end{array}\\ \mathbf{elif}\;b \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot 2}{t_1 - b}\\ \end{array}\\ \mathbf{elif}\;b \leq 1.15 \cdot 10^{-98}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;c \cdot \frac{b}{a \cdot c}\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{-c}{b}\\ \end{array} \]
Alternative 9
Error28.09%
Cost7368
\[\begin{array}{l} \mathbf{if}\;b \leq 3.1 \cdot 10^{-99}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{-0.5}{a} \cdot \left(b + \sqrt{c \cdot \left(a \cdot -4\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;c \cdot \frac{-1}{b}\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;\frac{\left(-b\right) - b}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{-c}{b}\\ \end{array} \]
Alternative 10
Error27.66%
Cost7368
\[\begin{array}{l} \mathbf{if}\;b \leq 1.15 \cdot 10^{-98}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{-0.5}{a} \cdot \left(b + \sqrt{c \cdot \left(a \cdot -4\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot -2}{-2 \cdot \left(a \cdot \frac{c}{b}\right) + b \cdot 2}\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;\frac{\left(-b\right) - b}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{-c}{b}\\ \end{array} \]
Alternative 11
Error71.14%
Cost644
\[\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{\left(-b\right) - b}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{-b}{a}\\ \end{array} \]
Alternative 12
Error34.85%
Cost644
\[\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{\left(-b\right) - b}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{-c}{b}\\ \end{array} \]

Error

Reproduce?

herbie shell --seed 2023089 
(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)))))))