| Alternative 1 | |
|---|---|
| Error | 9.1 |
| Cost | 44132 |
(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}
Results
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.0Initial program 64.0
Simplified64.0
[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}
\] |
Taylor expanded in b around inf 16.8
Taylor expanded in c around 0 16.8
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-175Initial program 3.4
Simplified3.4
[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}
\] |
Applied egg-rr3.4
Simplified3.4
[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.0Initial program 31.9
Simplified31.9
[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}
\] |
Taylor expanded in b around -inf 12.4
Simplified11.1
[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}
\] |
Applied egg-rr11.1
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)))))) < 1e308Initial program 2.7
Simplified2.7
[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)))))) Initial program 64.0
Simplified64.0
[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}
\] |
Taylor expanded in b around -inf 63.7
Simplified58.6
[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}
\] |
Taylor expanded in b around 0 58.6
Simplified55.5
[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}
\] |
Applied egg-rr41.3
Final simplification9.1
| Alternative 1 | |
|---|---|
| Error | 9.1 |
| Cost | 44132 |
| Alternative 2 | |
|---|---|
| Error | 9.2 |
| Cost | 44132 |
| Alternative 3 | |
|---|---|
| Error | 7.4 |
| Cost | 37988 |
| Alternative 4 | |
|---|---|
| Error | 7.4 |
| Cost | 37988 |
| Alternative 5 | |
|---|---|
| Error | 10.5 |
| Cost | 7888 |
| Alternative 6 | |
|---|---|
| Error | 6.9 |
| Cost | 7888 |
| Alternative 7 | |
|---|---|
| Error | 6.8 |
| Cost | 7888 |
| Alternative 8 | |
|---|---|
| Error | 6.8 |
| Cost | 7888 |
| Alternative 9 | |
|---|---|
| Error | 13.4 |
| Cost | 7632 |
| Alternative 10 | |
|---|---|
| Error | 17.6 |
| Cost | 7368 |
| Alternative 11 | |
|---|---|
| Error | 17.6 |
| Cost | 7240 |
| Alternative 12 | |
|---|---|
| Error | 21.1 |
| Cost | 7112 |
| Alternative 13 | |
|---|---|
| Error | 22.3 |
| Cost | 1092 |
| Alternative 14 | |
|---|---|
| Error | 45.8 |
| Cost | 580 |
| Alternative 15 | |
|---|---|
| Error | 22.6 |
| Cost | 580 |
| Alternative 16 | |
|---|---|
| Error | 22.5 |
| Cost | 580 |
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)))))))