?

Average Error: 19.6 → 9.1
Time: 1.8min
Precision: binary64
Cost: 44132

?

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

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


\end{array}\\
\mathbf{if}\;t_4 \leq -\infty:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;\frac{b + b}{a \cdot -2}\\

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


\end{array}\\

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

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


\end{array}\\

\mathbf{elif}\;t_4 \leq 0:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;\frac{b + \sqrt{\left(b \cdot b\right) \cdot 2 - a \cdot \left(c \cdot 8\right)} \cdot \sqrt{0.5}}{a \cdot -2}\\

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


\end{array}\\

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

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


\end{array}\\

\mathbf{elif}\;b \geq 0:\\
\;\;\;\;\frac{\sqrt{a \cdot -4} \cdot \sqrt{c} + b}{a \cdot -2}\\

\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 64.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} \]
    2. Simplified64.0

      \[\leadsto \color{blue}{\begin{array}{l} \color{blue}{\mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b + \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}} \]
      Proof

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

      rational_best-simplify-14 [=>]64.0

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

      rational_best-simplify-52 [=>]64.0

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

      rational_best-simplify-15 [=>]64.0

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

      rational_best-simplify-13 [=>]64.0

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

      rational_best-simplify-53 [=>]64.0

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

      rational_best-simplify-3 [=>]64.0

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

      rational_best-simplify-1 [=>]64.0

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

      rational_best-simplify-1 [=>]64.0

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

      rational_best-simplify-50 [=>]64.0

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

      rational_best-simplify-50 [=>]64.0

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

      metadata-eval [=>]64.0

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b + b}{a \cdot -2}\\ \mathbf{else}:\\ \;\;\;\;-1 \cdot \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)))))) < -1e-175

    1. Initial program 3.4

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

      \[\leadsto \color{blue}{\begin{array}{l} \color{blue}{\mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b + \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}} \]
      Proof

      [Start]3.4

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

      rational_best-simplify-14 [=>]3.4

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

      rational_best-simplify-52 [=>]3.4

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

      rational_best-simplify-15 [=>]3.4

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

      rational_best-simplify-13 [=>]3.4

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

      rational_best-simplify-53 [=>]3.4

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

      rational_best-simplify-3 [=>]3.4

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

      rational_best-simplify-1 [=>]3.4

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

      rational_best-simplify-1 [=>]3.4

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

      rational_best-simplify-50 [=>]3.4

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

      rational_best-simplify-50 [=>]3.4

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

      metadata-eval [=>]3.4

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

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

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

      [Start]3.4

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

      rational_best-simplify-1 [=>]3.4

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

      rational_best-simplify-63 [<=]3.4

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

      rational_best-simplify-1 [<=]3.4

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

      rational_best-simplify-1 [<=]3.4

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

      rational_best-simplify-63 [=>]3.4

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

    if -1e-175 < (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 31.9

      \[\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. Simplified31.9

      \[\leadsto \color{blue}{\begin{array}{l} \color{blue}{\mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b + \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}} \]
      Proof

      [Start]31.9

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

      rational_best-simplify-14 [=>]31.9

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

      rational_best-simplify-52 [=>]31.9

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

      rational_best-simplify-15 [=>]31.9

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

      rational_best-simplify-13 [=>]31.9

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

      rational_best-simplify-53 [=>]31.9

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

      rational_best-simplify-3 [=>]31.9

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

      rational_best-simplify-1 [=>]31.9

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

      rational_best-simplify-1 [=>]31.9

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

      rational_best-simplify-50 [=>]31.9

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

      rational_best-simplify-50 [=>]31.9

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

      metadata-eval [=>]31.9

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

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

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

      [Start]12.4

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

      rational_best-simplify-1 [=>]12.4

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

      rational_best-simplify-11 [<=]12.4

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

      trig-simplify-13 [=>]12.4

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

      rational_best-simplify-59 [=>]12.4

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

      rational_best-simplify-1 [<=]12.4

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

      rational_best-simplify-55 [=>]12.4

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

      rational_best-simplify-1 [=>]12.4

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

      rational_best-simplify-50 [=>]11.1

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

      rational_best-simplify-13 [=>]11.1

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

      rational_best-simplify-13 [=>]11.1

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

      rational_best-simplify-53 [=>]11.1

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

      metadata-eval [=>]11.1

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

      rational_best-simplify-8 [=>]11.1

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b + \color{blue}{\sqrt{\left(b \cdot b\right) \cdot 2 - a \cdot \left(c \cdot 8\right)} \cdot \sqrt{0.5}}}{a \cdot -2}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot 2}{\left(c \cdot \left(a \cdot \frac{2}{b}\right) - b\right) - 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)))))) < 1e308

    1. Initial program 2.7

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

      \[\leadsto \color{blue}{\begin{array}{l} \color{blue}{\mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b + \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}} \]
      Proof

      [Start]2.7

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

      rational_best-simplify-14 [=>]2.7

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

      rational_best-simplify-52 [=>]2.7

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

      rational_best-simplify-15 [=>]2.7

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

      rational_best-simplify-13 [=>]2.7

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

      rational_best-simplify-53 [=>]2.7

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

      rational_best-simplify-3 [=>]2.7

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

      rational_best-simplify-1 [=>]2.7

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

      rational_best-simplify-1 [=>]2.7

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

      rational_best-simplify-50 [=>]2.7

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

      rational_best-simplify-50 [=>]2.7

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

      metadata-eval [=>]2.7

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

    if 1e308 < (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 64.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} \]
    2. Simplified64.0

      \[\leadsto \color{blue}{\begin{array}{l} \color{blue}{\mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b + \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}} \]
      Proof

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

      rational_best-simplify-14 [=>]64.0

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

      rational_best-simplify-52 [=>]64.0

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

      rational_best-simplify-15 [=>]64.0

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

      rational_best-simplify-13 [=>]64.0

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

      rational_best-simplify-53 [=>]64.0

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

      rational_best-simplify-3 [=>]64.0

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

      rational_best-simplify-1 [=>]64.0

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

      rational_best-simplify-1 [=>]64.0

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

      rational_best-simplify-50 [=>]64.0

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

      rational_best-simplify-50 [=>]64.0

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

      metadata-eval [=>]64.0

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

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

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

      [Start]63.7

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

      rational_best-simplify-1 [=>]63.7

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

      rational_best-simplify-11 [<=]63.7

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

      trig-simplify-13 [=>]63.7

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

      rational_best-simplify-59 [=>]63.7

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

      rational_best-simplify-1 [<=]63.7

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

      rational_best-simplify-55 [=>]63.7

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

      rational_best-simplify-1 [=>]63.7

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

      rational_best-simplify-50 [=>]58.6

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

      rational_best-simplify-13 [=>]58.6

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

      rational_best-simplify-13 [=>]58.6

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

      rational_best-simplify-53 [=>]58.6

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

      metadata-eval [=>]58.6

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

      rational_best-simplify-8 [=>]58.6

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

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

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

      [Start]58.6

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

      rational_best-simplify-3 [=>]58.6

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

      rational_best-simplify-1 [<=]58.6

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

      exponential-simplify-21 [=>]55.5

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

      rational_best-simplify-1 [<=]55.5

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

      rational_best-simplify-50 [=>]55.5

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

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

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

Alternatives

Alternative 1
Error9.1
Cost44132
\[\begin{array}{l} t_0 := \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}\\ t_1 := \frac{b + t_0}{a \cdot -2}\\ t_2 := \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}\\ t_3 := \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{\left(-b\right) - t_2}{2 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) + t_2}\\ \end{array}\\ \mathbf{if}\;t_3 \leq -\infty:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b + b}{a \cdot -2}\\ \mathbf{else}:\\ \;\;\;\;-1 \cdot \frac{b}{a}\\ \end{array}\\ \mathbf{elif}\;t_3 \leq -1 \cdot 10^{-175}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot 2}{\sqrt{\frac{c \cdot a}{-0.5} + \left(b \cdot b - c \cdot \left(a + a\right)\right)} - b}\\ \end{array}\\ \mathbf{elif}\;t_3 \leq 0:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{-0.5}{a} \cdot \left(b + \sqrt{b \cdot b + \frac{a \cdot c}{-0.25}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot 2}{-1 \cdot b - b}\\ \end{array}\\ \mathbf{elif}\;t_3 \leq 10^{+308}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot 2}{t_0 - b}\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;\frac{\sqrt{a \cdot -4} \cdot \sqrt{c} + b}{a \cdot -2}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot 2}{\left(c \cdot \left(a \cdot \frac{2}{b}\right) - b\right) - b}\\ \end{array} \]
Alternative 2
Error9.2
Cost44132
\[\begin{array}{l} t_0 := \frac{c \cdot 2}{\left(c \cdot \left(a \cdot \frac{2}{b}\right) - b\right) - b}\\ t_1 := \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}\\ t_2 := \frac{b + t_1}{a \cdot -2}\\ t_3 := \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}\\ t_4 := \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{\left(-b\right) - t_3}{2 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) + t_3}\\ \end{array}\\ \mathbf{if}\;t_4 \leq -\infty:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b + b}{a \cdot -2}\\ \mathbf{else}:\\ \;\;\;\;-1 \cdot \frac{b}{a}\\ \end{array}\\ \mathbf{elif}\;t_4 \leq -1 \cdot 10^{-175}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot 2}{\sqrt{\frac{c \cdot a}{-0.5} + \left(b \cdot b - c \cdot \left(a + a\right)\right)} - b}\\ \end{array}\\ \mathbf{elif}\;t_4 \leq 0:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{\sqrt{c \cdot -4} \cdot \sqrt{a} + b}{a \cdot -2}\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array}\\ \mathbf{elif}\;t_4 \leq 10^{+308}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot 2}{t_1 - b}\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;\frac{\sqrt{a \cdot -4} \cdot \sqrt{c} + b}{a \cdot -2}\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 3
Error7.4
Cost37988
\[\begin{array}{l} t_0 := \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}\\ t_1 := \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b + t_0}{a \cdot -2}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot 2}{t_0 - b}\\ \end{array}\\ t_2 := \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}\\ t_3 := \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{\left(-b\right) - t_2}{2 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) + t_2}\\ \end{array}\\ t_4 := \frac{b + b}{a \cdot -2}\\ \mathbf{if}\;t_3 \leq -\infty:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;t_4\\ \mathbf{else}:\\ \;\;\;\;-1 \cdot \frac{b}{a}\\ \end{array}\\ \mathbf{elif}\;t_3 \leq -1 \cdot 10^{-175}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_3 \leq 0:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{-0.5}{a} \cdot \left(b + \sqrt{b \cdot b + \frac{a \cdot c}{-0.25}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot 2}{-1 \cdot b - b}\\ \end{array}\\ \mathbf{elif}\;t_3 \leq 4 \cdot 10^{+235}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;t_4\\ \mathbf{else}:\\ \;\;\;\;c \cdot \frac{-1}{b}\\ \end{array} \]
Alternative 4
Error7.4
Cost37988
\[\begin{array}{l} t_0 := \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}\\ t_1 := \frac{b + t_0}{a \cdot -2}\\ t_2 := \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}\\ t_3 := \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{\left(-b\right) - t_2}{2 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) + t_2}\\ \end{array}\\ t_4 := \frac{b + b}{a \cdot -2}\\ \mathbf{if}\;t_3 \leq -\infty:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;t_4\\ \mathbf{else}:\\ \;\;\;\;-1 \cdot \frac{b}{a}\\ \end{array}\\ \mathbf{elif}\;t_3 \leq -1 \cdot 10^{-175}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot 2}{\sqrt{\frac{c \cdot a}{-0.5} + \left(b \cdot b - c \cdot \left(a + a\right)\right)} - b}\\ \end{array}\\ \mathbf{elif}\;t_3 \leq 0:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{-0.5}{a} \cdot \left(b + \sqrt{b \cdot b + \frac{a \cdot c}{-0.25}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot 2}{-1 \cdot b - b}\\ \end{array}\\ \mathbf{elif}\;t_3 \leq 4 \cdot 10^{+235}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot 2}{t_0 - b}\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;t_4\\ \mathbf{else}:\\ \;\;\;\;c \cdot \frac{-1}{b}\\ \end{array} \]
Alternative 5
Error10.5
Cost7888
\[\begin{array}{l} t_0 := \frac{b + b}{a \cdot -2}\\ \mathbf{if}\;b \leq -3 \cdot 10^{-93}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot 2}{c \cdot \left(a \cdot \frac{2}{b}\right) + b \cdot -2}\\ \end{array}\\ \mathbf{elif}\;b \leq 1.65 \cdot 10^{-306}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot 2}{\sqrt{c \cdot \left(a \cdot -4\right)} - b}\\ \end{array}\\ \mathbf{elif}\;b \leq 2 \cdot 10^{+88}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{-0.5}{a} \cdot \left(b + \sqrt{b \cdot b + \frac{a \cdot c}{-0.25}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot 2}{-1 \cdot b - b}\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;-1 \cdot \frac{b}{a}\\ \end{array} \]
Alternative 6
Error6.9
Cost7888
\[\begin{array}{l} t_0 := \frac{b + b}{a \cdot -2}\\ t_1 := \sqrt{b \cdot b + \frac{a \cdot c}{-0.25}}\\ \mathbf{if}\;b \leq -3.1 \cdot 10^{+128}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot 2}{b \cdot -2}\\ \end{array}\\ \mathbf{elif}\;b \leq 1.65 \cdot 10^{-306}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;c \cdot \frac{2}{t_1 - b}\\ \end{array}\\ \mathbf{elif}\;b \leq 2 \cdot 10^{+88}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{-0.5}{a} \cdot \left(b + t_1\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot 2}{-1 \cdot b - b}\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;-1 \cdot \frac{b}{a}\\ \end{array} \]
Alternative 7
Error6.8
Cost7888
\[\begin{array}{l} t_0 := \frac{b + b}{a \cdot -2}\\ \mathbf{if}\;b \leq -1 \cdot 10^{+129}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot 2}{b \cdot -2}\\ \end{array}\\ \mathbf{elif}\;b \leq 1.65 \cdot 10^{-306}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot 2}{\sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)} - b}\\ \end{array}\\ \mathbf{elif}\;b \leq 2 \cdot 10^{+88}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{-0.5}{a} \cdot \left(b + \sqrt{b \cdot b + \frac{a \cdot c}{-0.25}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot 2}{-1 \cdot b - b}\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;-1 \cdot \frac{b}{a}\\ \end{array} \]
Alternative 8
Error6.8
Cost7888
\[\begin{array}{l} t_0 := \frac{b + b}{a \cdot -2}\\ t_1 := \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}\\ \mathbf{if}\;b \leq -8 \cdot 10^{+128}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot 2}{b \cdot -2}\\ \end{array}\\ \mathbf{elif}\;b \leq 1.65 \cdot 10^{-306}:\\ \;\;\;\;\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 2 \cdot 10^{+88}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b + t_1}{a \cdot -2}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{a}\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;-1 \cdot \frac{b}{a}\\ \end{array} \]
Alternative 9
Error13.4
Cost7632
\[\begin{array}{l} t_0 := \sqrt{c \cdot \left(a \cdot -4\right)}\\ t_1 := \frac{b + b}{a \cdot -2}\\ t_2 := \frac{c \cdot 2}{-1 \cdot b - b}\\ \mathbf{if}\;b \leq -3 \cdot 10^{-93}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot 2}{c \cdot \left(a \cdot \frac{2}{b}\right) + b \cdot -2}\\ \end{array}\\ \mathbf{elif}\;b \leq 1.65 \cdot 10^{-306}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot 2}{t_0 - b}\\ \end{array}\\ \mathbf{elif}\;b \leq 10^{-62}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{-0.5}{a} \cdot \left(t_0 + b\right)\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;\frac{c}{b} + -1 \cdot \frac{b}{a}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 10
Error17.6
Cost7368
\[\begin{array}{l} t_0 := \frac{c \cdot 2}{-1 \cdot b - b}\\ \mathbf{if}\;b \leq 6.6 \cdot 10^{-62}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{-0.5}{a} \cdot \left(\sqrt{c \cdot \left(a \cdot -4\right)} + b\right)\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;\frac{c}{b} + -1 \cdot \frac{b}{a}\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 11
Error17.6
Cost7240
\[\begin{array}{l} \mathbf{if}\;b \leq 1.05 \cdot 10^{-63}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{\sqrt{c \cdot \left(a \cdot -4\right)}}{a \cdot -2}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot 2}{\left(c \cdot \left(a \cdot \frac{2}{b}\right) - b\right) - b}\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;\frac{c}{b} + -1 \cdot \frac{b}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot 2}{-1 \cdot b - b}\\ \end{array} \]
Alternative 12
Error21.1
Cost7112
\[\begin{array}{l} t_0 := \frac{c \cdot 2}{-1 \cdot b - b}\\ \mathbf{if}\;b \leq 3 \cdot 10^{-80}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;-0.5 \cdot \sqrt{c \cdot \frac{-4}{a}}\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;\frac{c}{b} + -1 \cdot \frac{b}{a}\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 13
Error22.3
Cost1092
\[\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b + b}{a \cdot -2}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot 2}{c \cdot \left(a \cdot \frac{2}{b}\right) + b \cdot -2}\\ \end{array} \]
Alternative 14
Error45.8
Cost580
\[\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b + b}{a \cdot -2}\\ \mathbf{else}:\\ \;\;\;\;-1 \cdot \frac{b}{a}\\ \end{array} \]
Alternative 15
Error22.6
Cost580
\[\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b + b}{a \cdot -2}\\ \mathbf{else}:\\ \;\;\;\;c \cdot \frac{-1}{b}\\ \end{array} \]
Alternative 16
Error22.5
Cost580
\[\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{b + b}{a \cdot -2}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot 2}{b \cdot -2}\\ \end{array} \]

Error

Reproduce?

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