?

Average Error: 19.6 → 6.9
Time: 35.2s
Precision: binary64
Cost: 38244

?

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

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


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

\mathbf{else}:\\
\;\;\;\;t_4\\


\end{array}\\
\mathbf{if}\;t_5 \leq -\infty:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;t_2\\

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


\end{array}\\

\mathbf{elif}\;t_5 \leq -4 \cdot 10^{-187}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;\frac{2 \cdot c}{-0.5 \cdot \left(b - \left(\left(-b\right) - t_1 \cdot 2\right)\right)}\\

\mathbf{else}:\\
\;\;\;\;t_4\\


\end{array}\\

\mathbf{elif}\;t_5 \leq 0:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) - b}\\

\mathbf{else}:\\
\;\;\;\;t_4\\


\end{array}\\

\mathbf{elif}\;t_5 \leq 10^{+279}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;\frac{2 \cdot c}{\left(b - t_1\right) + b \cdot -2}\\

\mathbf{else}:\\
\;\;\;\;t_4\\


\end{array}\\

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

\mathbf{else}:\\
\;\;\;\;\frac{c}{b} + 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 2 c) (-.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 4 a) c))))) (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 4 a) c)))) (*.f64 2 a))) < -inf.0

    1. Initial program 64.0

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

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

      [Start]64.0

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{-2}{b + b}\\ \mathbf{else}:\\ \;\;\;\;-1 \cdot \frac{b}{a}\\ \end{array} \]
    5. Simplified18.6

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

      [Start]18.6

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

      rational.json-simplify-48 [=>]18.6

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

      rational.json-simplify-31 [<=]18.6

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

    if -inf.0 < (if (>=.f64 b 0) (/.f64 (*.f64 2 c) (-.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 4 a) c))))) (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 4 a) c)))) (*.f64 2 a))) < -4.0000000000000001e-187

    1. Initial program 3.1

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

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

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

    1. Initial program 31.7

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

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

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

    1. Initial program 2.8

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

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

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

    1. Initial program 60.1

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

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

      [Start]60.1

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

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

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

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

      [Start]14.1

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

      rational.json-simplify-48 [=>]14.1

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

      rational.json-simplify-31 [<=]14.1

      \[ \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{-2}{b + b}\\ \mathbf{else}:\\ \;\;\;\;\color{blue}{\frac{c}{b}} + \frac{-b}{a}\\ \end{array} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification6.9

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

Alternatives

Alternative 1
Error6.9
Cost38244
\[\begin{array}{l} t_0 := \frac{-b}{a}\\ t_1 := c \cdot \frac{-2}{b + b}\\ t_2 := \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}\\ t_3 := \frac{\left(-b\right) + t_2}{2 \cdot a}\\ t_4 := \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - t_2}\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array}\\ \mathbf{if}\;t_4 \leq -\infty:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array}\\ \mathbf{elif}\;t_4 \leq -4 \cdot 10^{-187}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;t_4 \leq 0:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - b}\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array}\\ \mathbf{elif}\;t_4 \leq 10^{+279}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(b - \sqrt{b \cdot b + c \cdot \left(a \cdot -4\right)}\right) + b \cdot -2}\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} + t_0\\ \end{array} \]
Alternative 2
Error6.9
Cost38052
\[\begin{array}{l} t_0 := \frac{-b}{a}\\ t_1 := c \cdot \frac{-2}{b + b}\\ t_2 := \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}\\ t_3 := \frac{\left(-b\right) + t_2}{2 \cdot a}\\ t_4 := \begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - t_2}\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array}\\ \mathbf{if}\;t_4 \leq -\infty:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array}\\ \mathbf{elif}\;t_4 \leq -4 \cdot 10^{-187}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;t_4 \leq 0:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{\left(-b\right) - b}\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array}\\ \mathbf{elif}\;t_4 \leq 10^{+279}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} + t_0\\ \end{array} \]
Alternative 3
Error6.8
Cost7820
\[\begin{array}{l} t_0 := \sqrt{b \cdot b - \frac{c}{\frac{0.25}{a}}}\\ \mathbf{if}\;b \leq -4.2 \cdot 10^{+131}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{-2}{b + t_0}\\ \mathbf{else}:\\ \;\;\;\;\left(4 \cdot \frac{c}{b} + -1 \cdot \frac{b}{a}\right) - 3 \cdot \frac{c}{b}\\ \end{array}\\ \mathbf{elif}\;b \leq 5 \cdot 10^{+45}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{-2}{b + \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}\\ \mathbf{else}:\\ \;\;\;\;\left(b - t_0\right) \cdot \frac{-0.5}{a}\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;\frac{2 \cdot c}{-0.5 \cdot \left(b - \left(\left(-b\right) - \left(b + a \cdot \left(-2 \cdot \frac{c}{b}\right)\right) \cdot 2\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\\ \end{array} \]
Alternative 4
Error6.8
Cost7756
\[\begin{array}{l} \mathbf{if}\;b \leq -2.9 \cdot 10^{+132}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{-2}{b + b}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} + \frac{-b}{a}\\ \end{array}\\ \mathbf{elif}\;b \leq 5 \cdot 10^{+45}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{-2}{b + \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}\\ \mathbf{else}:\\ \;\;\;\;\left(b - \sqrt{b \cdot b - \frac{c}{\frac{0.25}{a}}}\right) \cdot \frac{-0.5}{a}\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;\frac{\frac{c}{\left(-b\right) + \frac{a \cdot \frac{\frac{c}{-0.5}}{b}}{-2}}}{1}\\ \mathbf{else}:\\ \;\;\;\;\left(b - \left(\left(-b\right) + 2 \cdot \left(a \cdot \frac{c}{b}\right)\right)\right) \cdot \frac{-0.5}{a}\\ \end{array} \]
Alternative 5
Error6.8
Cost7756
\[\begin{array}{l} t_0 := \sqrt{b \cdot b - \frac{c}{\frac{0.25}{a}}}\\ \mathbf{if}\;b \leq -2.7 \cdot 10^{+131}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{-2}{b + t_0}\\ \mathbf{else}:\\ \;\;\;\;\left(4 \cdot \frac{c}{b} + -1 \cdot \frac{b}{a}\right) - 3 \cdot \frac{c}{b}\\ \end{array}\\ \mathbf{elif}\;b \leq 4.9 \cdot 10^{+45}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{-2}{b + \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}}\\ \mathbf{else}:\\ \;\;\;\;\left(b - t_0\right) \cdot \frac{-0.5}{a}\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;\frac{\frac{c}{\left(-b\right) + \frac{a \cdot \frac{\frac{c}{-0.5}}{b}}{-2}}}{1}\\ \mathbf{else}:\\ \;\;\;\;\left(b - \left(\left(-b\right) + 2 \cdot \left(a \cdot \frac{c}{b}\right)\right)\right) \cdot \frac{-0.5}{a}\\ \end{array} \]
Alternative 6
Error14.9
Cost7624
\[\begin{array}{l} t_0 := c \cdot \frac{-2}{b + b}\\ \mathbf{if}\;b \leq -2.6 \cdot 10^{+133}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} + \frac{-b}{a}\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\left(b - \sqrt{b \cdot b - \frac{c}{\frac{0.25}{a}}}\right) \cdot \frac{-0.5}{a}\\ \end{array} \]
Alternative 7
Error14.9
Cost7624
\[\begin{array}{l} t_0 := c \cdot \frac{-2}{b + b}\\ \mathbf{if}\;b \leq -7.6 \cdot 10^{+133}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} + \frac{-b}{a}\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{b \cdot b + c \cdot \frac{a}{-0.25}} - b}{a + a}\\ \end{array} \]
Alternative 8
Error18.1
Cost7368
\[\begin{array}{l} t_0 := c \cdot \frac{-2}{b + b}\\ \mathbf{if}\;b \leq -1.4 \cdot 10^{-86}:\\ \;\;\;\;\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} + \frac{-b}{a}\\ \end{array}\\ \mathbf{elif}\;b \geq 0:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\left(b - \sqrt{c \cdot \left(a \cdot -4\right)}\right) \cdot \frac{-0.5}{a}\\ \end{array} \]
Alternative 9
Error22.8
Cost1284
\[\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{\frac{c \cdot 0.5}{b + \left(b + a \cdot \frac{\frac{c}{-0.5}}{b}\right)}}{-0.25}\\ \mathbf{else}:\\ \;\;\;\;b \cdot \frac{-0.5}{a} - \frac{a \cdot \left(-\frac{c}{b}\right) - b \cdot -0.5}{a}\\ \end{array} \]
Alternative 10
Error22.8
Cost1156
\[\begin{array}{l} t_0 := a \cdot \frac{c}{b}\\ \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{-2}{b + \left(b + -2 \cdot t_0\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(b - \left(\left(-b\right) + 2 \cdot t_0\right)\right) \cdot \frac{-0.5}{a}\\ \end{array} \]
Alternative 11
Error22.8
Cost1156
\[\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{-2}{b + \left(b + \frac{a}{b \cdot -0.5} \cdot c\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(b - \left(\left(-b\right) + 2 \cdot \left(a \cdot \frac{c}{b}\right)\right)\right) \cdot \frac{-0.5}{a}\\ \end{array} \]
Alternative 12
Error22.8
Cost1156
\[\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;\frac{\frac{c}{\left(-b\right) + \frac{a \cdot \frac{\frac{c}{-0.5}}{b}}{-2}}}{1}\\ \mathbf{else}:\\ \;\;\;\;\left(b - \left(\left(-b\right) + 2 \cdot \left(a \cdot \frac{c}{b}\right)\right)\right) \cdot \frac{-0.5}{a}\\ \end{array} \]
Alternative 13
Error22.9
Cost644
\[\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{-2}{b + b}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} + \frac{-b}{a}\\ \end{array} \]
Alternative 14
Error23.0
Cost580
\[\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{-2}{b + b}\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot 2\right) \cdot \frac{-0.5}{a}\\ \end{array} \]
Alternative 15
Error22.9
Cost580
\[\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{-2}{b + b}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{-1}{\frac{b}{a}}}\\ \end{array} \]
Alternative 16
Error22.9
Cost580
\[\begin{array}{l} \mathbf{if}\;b \geq 0:\\ \;\;\;\;c \cdot \frac{-2}{b + b}\\ \mathbf{else}:\\ \;\;\;\;\frac{-b}{a}\\ \end{array} \]

Error

Reproduce?

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