| Alternative 1 | |
|---|---|
| Error | 10.0 |
| Cost | 7888 |
(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 (sqrt (- (* b b) (* (* 4.0 a) c))))
(t_1
(if (>= b 0.0)
(/ (- (- b) t_0) (* 2.0 a))
(/ (* 2.0 c) (+ (- b) t_0))))
(t_2 (/ (- (- b) b) (* 2.0 a))))
(if (<= t_1 (- INFINITY))
(if (>= b 0.0) t_2 (/ b (- a)))
(if (<= t_1 -5e-218)
t_1
(if (<= t_1 0.0)
(if (>= b 0.0)
(* (+ b (sqrt (- (* b b) (* c (* a 4.0))))) (/ -0.5 a))
(/ (* 2.0 c) (+ (- b) (* -1.0 b))))
(if (<= t_1 1e+301) t_1 (if (>= b 0.0) t_2 (/ c (- b)))))))))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 = sqrt(((b * b) - ((4.0 * a) * c)));
double tmp;
if (b >= 0.0) {
tmp = (-b - t_0) / (2.0 * a);
} else {
tmp = (2.0 * c) / (-b + t_0);
}
double t_1 = tmp;
double t_2 = (-b - b) / (2.0 * a);
double tmp_2;
if (t_1 <= -((double) INFINITY)) {
double tmp_3;
if (b >= 0.0) {
tmp_3 = t_2;
} else {
tmp_3 = b / -a;
}
tmp_2 = tmp_3;
} else if (t_1 <= -5e-218) {
tmp_2 = t_1;
} else if (t_1 <= 0.0) {
double tmp_4;
if (b >= 0.0) {
tmp_4 = (b + sqrt(((b * b) - (c * (a * 4.0))))) * (-0.5 / a);
} else {
tmp_4 = (2.0 * c) / (-b + (-1.0 * b));
}
tmp_2 = tmp_4;
} else if (t_1 <= 1e+301) {
tmp_2 = t_1;
} else if (b >= 0.0) {
tmp_2 = t_2;
} else {
tmp_2 = c / -b;
}
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 = Math.sqrt(((b * b) - ((4.0 * a) * c)));
double tmp;
if (b >= 0.0) {
tmp = (-b - t_0) / (2.0 * a);
} else {
tmp = (2.0 * c) / (-b + t_0);
}
double t_1 = tmp;
double t_2 = (-b - b) / (2.0 * a);
double tmp_2;
if (t_1 <= -Double.POSITIVE_INFINITY) {
double tmp_3;
if (b >= 0.0) {
tmp_3 = t_2;
} else {
tmp_3 = b / -a;
}
tmp_2 = tmp_3;
} else if (t_1 <= -5e-218) {
tmp_2 = t_1;
} else if (t_1 <= 0.0) {
double tmp_4;
if (b >= 0.0) {
tmp_4 = (b + Math.sqrt(((b * b) - (c * (a * 4.0))))) * (-0.5 / a);
} else {
tmp_4 = (2.0 * c) / (-b + (-1.0 * b));
}
tmp_2 = tmp_4;
} else if (t_1 <= 1e+301) {
tmp_2 = t_1;
} else if (b >= 0.0) {
tmp_2 = t_2;
} else {
tmp_2 = c / -b;
}
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 = math.sqrt(((b * b) - ((4.0 * a) * c))) tmp = 0 if b >= 0.0: tmp = (-b - t_0) / (2.0 * a) else: tmp = (2.0 * c) / (-b + t_0) t_1 = tmp t_2 = (-b - b) / (2.0 * a) tmp_2 = 0 if t_1 <= -math.inf: tmp_3 = 0 if b >= 0.0: tmp_3 = t_2 else: tmp_3 = b / -a tmp_2 = tmp_3 elif t_1 <= -5e-218: tmp_2 = t_1 elif t_1 <= 0.0: tmp_4 = 0 if b >= 0.0: tmp_4 = (b + math.sqrt(((b * b) - (c * (a * 4.0))))) * (-0.5 / a) else: tmp_4 = (2.0 * c) / (-b + (-1.0 * b)) tmp_2 = tmp_4 elif t_1 <= 1e+301: tmp_2 = t_1 elif b >= 0.0: tmp_2 = t_2 else: tmp_2 = c / -b 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 = sqrt(Float64(Float64(b * b) - Float64(Float64(4.0 * a) * c))) tmp = 0.0 if (b >= 0.0) tmp = Float64(Float64(Float64(-b) - t_0) / Float64(2.0 * a)); else tmp = Float64(Float64(2.0 * c) / Float64(Float64(-b) + t_0)); end t_1 = tmp t_2 = Float64(Float64(Float64(-b) - b) / Float64(2.0 * a)) tmp_2 = 0.0 if (t_1 <= Float64(-Inf)) tmp_3 = 0.0 if (b >= 0.0) tmp_3 = t_2; else tmp_3 = Float64(b / Float64(-a)); end tmp_2 = tmp_3; elseif (t_1 <= -5e-218) tmp_2 = t_1; elseif (t_1 <= 0.0) tmp_4 = 0.0 if (b >= 0.0) tmp_4 = Float64(Float64(b + sqrt(Float64(Float64(b * b) - Float64(c * Float64(a * 4.0))))) * Float64(-0.5 / a)); else tmp_4 = Float64(Float64(2.0 * c) / Float64(Float64(-b) + Float64(-1.0 * b))); end tmp_2 = tmp_4; elseif (t_1 <= 1e+301) tmp_2 = t_1; elseif (b >= 0.0) tmp_2 = t_2; else tmp_2 = Float64(c / Float64(-b)); 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_6 = code(a, b, c) t_0 = sqrt(((b * b) - ((4.0 * a) * c))); tmp = 0.0; if (b >= 0.0) tmp = (-b - t_0) / (2.0 * a); else tmp = (2.0 * c) / (-b + t_0); end t_1 = tmp; t_2 = (-b - b) / (2.0 * a); tmp_3 = 0.0; if (t_1 <= -Inf) tmp_4 = 0.0; if (b >= 0.0) tmp_4 = t_2; else tmp_4 = b / -a; end tmp_3 = tmp_4; elseif (t_1 <= -5e-218) tmp_3 = t_1; elseif (t_1 <= 0.0) tmp_5 = 0.0; if (b >= 0.0) tmp_5 = (b + sqrt(((b * b) - (c * (a * 4.0))))) * (-0.5 / a); else tmp_5 = (2.0 * c) / (-b + (-1.0 * b)); end tmp_3 = tmp_5; elseif (t_1 <= 1e+301) tmp_3 = t_1; elseif (b >= 0.0) tmp_3 = t_2; else tmp_3 = c / -b; end tmp_6 = 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[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(N[(4.0 * a), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = If[GreaterEqual[b, 0.0], N[(N[((-b) - t$95$0), $MachinePrecision] / N[(2.0 * a), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * c), $MachinePrecision] / N[((-b) + t$95$0), $MachinePrecision]), $MachinePrecision]]}, Block[{t$95$2 = N[(N[((-b) - b), $MachinePrecision] / N[(2.0 * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], If[GreaterEqual[b, 0.0], t$95$2, N[(b / (-a)), $MachinePrecision]], If[LessEqual[t$95$1, -5e-218], t$95$1, If[LessEqual[t$95$1, 0.0], If[GreaterEqual[b, 0.0], N[(N[(b + N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(c * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(-0.5 / a), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * c), $MachinePrecision] / N[((-b) + N[(-1.0 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], If[LessEqual[t$95$1, 1e+301], t$95$1, If[GreaterEqual[b, 0.0], t$95$2, N[(c / (-b)), $MachinePrecision]]]]]]]]]
\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 := \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}\\
t_1 := \begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;\frac{\left(-b\right) - t_0}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) + t_0}\\
\end{array}\\
t_2 := \frac{\left(-b\right) - b}{2 \cdot a}\\
\mathbf{if}\;t_1 \leq -\infty:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;\frac{b}{-a}\\
\end{array}\\
\mathbf{elif}\;t_1 \leq -5 \cdot 10^{-218}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_1 \leq 0:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;\left(b + \sqrt{b \cdot b - c \cdot \left(a \cdot 4\right)}\right) \cdot \frac{-0.5}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) + -1 \cdot b}\\
\end{array}\\
\mathbf{elif}\;t_1 \leq 10^{+301}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \geq 0:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{-b}\\
\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
Taylor expanded in b around inf 17.0
Taylor expanded in c around 0 17.0
Simplified17.0
[Start]17.0 | \[ \begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;\frac{\left(-b\right) - b}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;-1 \cdot \frac{b}{a}\\
\end{array}
\] |
|---|---|
rational.json-simplify-2 [=>]17.0 | \[ \begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;\frac{\left(-b\right) - b}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{b}{a} \cdot -1\\
\end{array}
\] |
rational.json-simplify-9 [=>]17.0 | \[ \begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;\frac{\left(-b\right) - b}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;-\frac{b}{a}\\
\end{array}
\] |
rational.json-simplify-10 [=>]17.0 | \[ \begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;\frac{\left(-b\right) - b}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{b}{a}}{-1}\\
\end{array}
\] |
rational.json-simplify-47 [=>]17.0 | \[ \begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;\frac{\left(-b\right) - b}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{b}{a \cdot -1}\\
\end{array}
\] |
rational.json-simplify-9 [=>]17.0 | \[ \begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;\frac{\left(-b\right) - b}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\color{blue}{\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)))))) < -5.00000000000000041e-218 or 0.0 < (if (>=.f64 b 0) (/.f64 (-.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 4 a) c)))) (*.f64 2 a)) (/.f64 (*.f64 2 c) (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 4 a) c)))))) < 1.00000000000000005e301Initial program 2.7
if -5.00000000000000041e-218 < (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 33.3
Taylor expanded in b around -inf 11.3
Applied egg-rr11.3
Simplified11.3
[Start]11.3 | \[ \begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;\frac{\frac{b + \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{-2}}{a} + 0\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) + -1 \cdot b}\\
\end{array}
\] |
|---|---|
rational.json-simplify-4 [=>]11.3 | \[ \begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;\color{blue}{\frac{\frac{b + \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{-2}}{a}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) + -1 \cdot b}\\
\end{array}
\] |
rational.json-simplify-6 [<=]11.3 | \[ \begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;\frac{\frac{\color{blue}{1 \cdot \left(b + \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}\right)}}{-2}}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) + -1 \cdot b}\\
\end{array}
\] |
rational.json-simplify-49 [=>]11.3 | \[ \begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;\frac{\color{blue}{\left(b + \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}\right) \cdot \frac{1}{-2}}}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) + -1 \cdot b}\\
\end{array}
\] |
metadata-eval [=>]11.3 | \[ \begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;\frac{\left(b + \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}\right) \cdot \color{blue}{-0.5}}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) + -1 \cdot b}\\
\end{array}
\] |
rational.json-simplify-2 [=>]11.3 | \[ \begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;\frac{\color{blue}{-0.5 \cdot \left(b + \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}\right)}}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) + -1 \cdot b}\\
\end{array}
\] |
rational.json-simplify-49 [=>]11.3 | \[ \begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;\color{blue}{\left(b + \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}\right) \cdot \frac{-0.5}{a}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) + -1 \cdot b}\\
\end{array}
\] |
rational.json-simplify-43 [<=]11.3 | \[ \begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;\left(b + \sqrt{b \cdot b - \color{blue}{c \cdot \left(4 \cdot a\right)}}\right) \cdot \frac{-0.5}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) + -1 \cdot b}\\
\end{array}
\] |
rational.json-simplify-2 [=>]11.3 | \[ \begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;\left(b + \sqrt{b \cdot b - c \cdot \color{blue}{\left(a \cdot 4\right)}}\right) \cdot \frac{-0.5}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot c}{\left(-b\right) + -1 \cdot b}\\
\end{array}
\] |
if 1.00000000000000005e301 < (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 63.0
Taylor expanded in b around inf 20.1
Taylor expanded in b around -inf 15.4
Simplified15.4
[Start]15.4 | \[ \begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;\frac{\left(-b\right) - b}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;-1 \cdot \frac{c}{b}\\
\end{array}
\] |
|---|---|
rational.json-simplify-2 [=>]15.4 | \[ \begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;\frac{\left(-b\right) - b}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{b} \cdot -1\\
\end{array}
\] |
rational.json-simplify-9 [=>]15.4 | \[ \begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;\frac{\left(-b\right) - b}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;-\frac{c}{b}\\
\end{array}
\] |
rational.json-simplify-10 [=>]15.4 | \[ \begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;\frac{\left(-b\right) - b}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{c}{b}}{-1}\\
\end{array}
\] |
rational.json-simplify-47 [=>]15.4 | \[ \begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;\frac{\left(-b\right) - b}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{b \cdot -1}\\
\end{array}
\] |
rational.json-simplify-8 [<=]15.4 | \[ \begin{array}{l}
\mathbf{if}\;b \geq 0:\\
\;\;\;\;\frac{\left(-b\right) - b}{2 \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\color{blue}{\frac{c}{-b}}\\
\end{array}
\] |
Final simplification6.9
| Alternative 1 | |
|---|---|
| Error | 10.0 |
| Cost | 7888 |
| Alternative 2 | |
|---|---|
| Error | 10.0 |
| Cost | 7888 |
| Alternative 3 | |
|---|---|
| Error | 6.9 |
| Cost | 7888 |
| Alternative 4 | |
|---|---|
| Error | 13.4 |
| Cost | 7632 |
| Alternative 5 | |
|---|---|
| Error | 18.4 |
| Cost | 7368 |
| Alternative 6 | |
|---|---|
| Error | 18.7 |
| Cost | 7304 |
| Alternative 7 | |
|---|---|
| Error | 22.7 |
| Cost | 7112 |
| Alternative 8 | |
|---|---|
| Error | 23.2 |
| Cost | 1156 |
| Alternative 9 | |
|---|---|
| Error | 23.2 |
| Cost | 1156 |
| Alternative 10 | |
|---|---|
| Error | 45.5 |
| Cost | 644 |
| Alternative 11 | |
|---|---|
| Error | 23.3 |
| Cost | 644 |
herbie shell --seed 2023075
(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)))))))