| Alternative 1 | |
|---|---|
| Error | 49.88% |
| Cost | 2289 |
(FPCore (x y z t a b c i j k) :precision binary64 (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* t (* a -4.0)))
(t_2 (* i (* x -4.0)))
(t_3 (+ (+ (+ (* (* (* (* x 18.0) y) z) t) t_1) (* b c)) t_2)))
(if (<= t_3 (- INFINITY))
(+ (+ (* x (* t (* 18.0 (* y z)))) (* b c)) (* x (* i -4.0)))
(if (<= t_3 4e+307)
(+
(+ (+ (+ (* t (* z (* x (* 18.0 y)))) t_1) (* b c)) t_2)
(* k (* j -27.0)))
(+ (* b c) (* x (+ (* 18.0 (* y (* z t))) (* i -4.0))))))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = t * (a * -4.0);
double t_2 = i * (x * -4.0);
double t_3 = ((((((x * 18.0) * y) * z) * t) + t_1) + (b * c)) + t_2;
double tmp;
if (t_3 <= -((double) INFINITY)) {
tmp = ((x * (t * (18.0 * (y * z)))) + (b * c)) + (x * (i * -4.0));
} else if (t_3 <= 4e+307) {
tmp = ((((t * (z * (x * (18.0 * y)))) + t_1) + (b * c)) + t_2) + (k * (j * -27.0));
} else {
tmp = (b * c) + (x * ((18.0 * (y * (z * t))) + (i * -4.0)));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = t * (a * -4.0);
double t_2 = i * (x * -4.0);
double t_3 = ((((((x * 18.0) * y) * z) * t) + t_1) + (b * c)) + t_2;
double tmp;
if (t_3 <= -Double.POSITIVE_INFINITY) {
tmp = ((x * (t * (18.0 * (y * z)))) + (b * c)) + (x * (i * -4.0));
} else if (t_3 <= 4e+307) {
tmp = ((((t * (z * (x * (18.0 * y)))) + t_1) + (b * c)) + t_2) + (k * (j * -27.0));
} else {
tmp = (b * c) + (x * ((18.0 * (y * (z * t))) + (i * -4.0)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)
def code(x, y, z, t, a, b, c, i, j, k): t_1 = t * (a * -4.0) t_2 = i * (x * -4.0) t_3 = ((((((x * 18.0) * y) * z) * t) + t_1) + (b * c)) + t_2 tmp = 0 if t_3 <= -math.inf: tmp = ((x * (t * (18.0 * (y * z)))) + (b * c)) + (x * (i * -4.0)) elif t_3 <= 4e+307: tmp = ((((t * (z * (x * (18.0 * y)))) + t_1) + (b * c)) + t_2) + (k * (j * -27.0)) else: tmp = (b * c) + (x * ((18.0 * (y * (z * t))) + (i * -4.0))) return tmp
function code(x, y, z, t, a, b, c, i, j, k) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) end
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(t * Float64(a * -4.0)) t_2 = Float64(i * Float64(x * -4.0)) t_3 = Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) + t_1) + Float64(b * c)) + t_2) tmp = 0.0 if (t_3 <= Float64(-Inf)) tmp = Float64(Float64(Float64(x * Float64(t * Float64(18.0 * Float64(y * z)))) + Float64(b * c)) + Float64(x * Float64(i * -4.0))); elseif (t_3 <= 4e+307) tmp = Float64(Float64(Float64(Float64(Float64(t * Float64(z * Float64(x * Float64(18.0 * y)))) + t_1) + Float64(b * c)) + t_2) + Float64(k * Float64(j * -27.0))); else tmp = Float64(Float64(b * c) + Float64(x * Float64(Float64(18.0 * Float64(y * Float64(z * t))) + Float64(i * -4.0)))); end return tmp end
function tmp = code(x, y, z, t, a, b, c, i, j, k) tmp = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k); end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = t * (a * -4.0); t_2 = i * (x * -4.0); t_3 = ((((((x * 18.0) * y) * z) * t) + t_1) + (b * c)) + t_2; tmp = 0.0; if (t_3 <= -Inf) tmp = ((x * (t * (18.0 * (y * z)))) + (b * c)) + (x * (i * -4.0)); elseif (t_3 <= 4e+307) tmp = ((((t * (z * (x * (18.0 * y)))) + t_1) + (b * c)) + t_2) + (k * (j * -27.0)); else tmp = (b * c) + (x * ((18.0 * (y * (z * t))) + (i * -4.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(i * N[(x * -4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] + t$95$1), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], N[(N[(N[(x * N[(t * N[(18.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] + N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 4e+307], N[(N[(N[(N[(N[(t * N[(z * N[(x * N[(18.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision] + N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] + N[(x * N[(N[(18.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\begin{array}{l}
t_1 := t \cdot \left(a \cdot -4\right)\\
t_2 := i \cdot \left(x \cdot -4\right)\\
t_3 := \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t + t_1\right) + b \cdot c\right) + t_2\\
\mathbf{if}\;t_3 \leq -\infty:\\
\;\;\;\;\left(x \cdot \left(t \cdot \left(18 \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) + x \cdot \left(i \cdot -4\right)\\
\mathbf{elif}\;t_3 \leq 4 \cdot 10^{+307}:\\
\;\;\;\;\left(\left(\left(t \cdot \left(z \cdot \left(x \cdot \left(18 \cdot y\right)\right)\right) + t_1\right) + b \cdot c\right) + t_2\right) + k \cdot \left(j \cdot -27\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) + i \cdot -4\right)\\
\end{array}
Results
| Original | 8.27% |
|---|---|
| Target | 2.33% |
| Herbie | 3.1% |
if (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) < -inf.0Initial program 100
Simplified64.8
[Start]100 | \[ \left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\] |
|---|---|
associate--l- [=>]100 | \[ \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)}
\] |
associate-+l- [=>]100 | \[ \color{blue}{\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(\left(a \cdot 4\right) \cdot t - b \cdot c\right)\right)} - \left(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)
\] |
associate-+l- [<=]100 | \[ \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right)} - \left(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)
\] |
distribute-rgt-out-- [=>]100 | \[ \left(\color{blue}{t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)} + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)
\] |
associate-*l* [=>]64.83 | \[ \left(t \cdot \left(\color{blue}{\left(x \cdot 18\right) \cdot \left(y \cdot z\right)} - a \cdot 4\right) + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)
\] |
associate-*l* [=>]64.83 | \[ \left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(\color{blue}{x \cdot \left(4 \cdot i\right)} + \left(j \cdot 27\right) \cdot k\right)
\] |
associate-*l* [=>]64.8 | \[ \left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + \color{blue}{j \cdot \left(27 \cdot k\right)}\right)
\] |
Taylor expanded in x around inf 68.44
Simplified68.44
[Start]68.44 | \[ \left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - 4 \cdot \left(i \cdot x\right)
\] |
|---|---|
associate-*r* [=>]68.44 | \[ \left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \color{blue}{\left(4 \cdot i\right) \cdot x}
\] |
*-commutative [<=]68.44 | \[ \left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \color{blue}{x \cdot \left(4 \cdot i\right)}
\] |
Taylor expanded in x around inf 27.89
Simplified40.8
[Start]27.89 | \[ \left(18 \cdot \left(y \cdot \left(t \cdot \left(z \cdot x\right)\right)\right) + b \cdot c\right) - x \cdot \left(4 \cdot i\right)
\] |
|---|---|
associate-*r* [=>]28.83 | \[ \left(\color{blue}{\left(18 \cdot y\right) \cdot \left(t \cdot \left(z \cdot x\right)\right)} + b \cdot c\right) - x \cdot \left(4 \cdot i\right)
\] |
associate-*r* [=>]19.47 | \[ \left(\left(18 \cdot y\right) \cdot \color{blue}{\left(\left(t \cdot z\right) \cdot x\right)} + b \cdot c\right) - x \cdot \left(4 \cdot i\right)
\] |
associate-*r* [=>]20.78 | \[ \left(\color{blue}{\left(\left(18 \cdot y\right) \cdot \left(t \cdot z\right)\right) \cdot x} + b \cdot c\right) - x \cdot \left(4 \cdot i\right)
\] |
*-commutative [=>]20.78 | \[ \left(\left(\left(18 \cdot y\right) \cdot \color{blue}{\left(z \cdot t\right)}\right) \cdot x + b \cdot c\right) - x \cdot \left(4 \cdot i\right)
\] |
associate-*l* [<=]41.14 | \[ \left(\color{blue}{\left(\left(\left(18 \cdot y\right) \cdot z\right) \cdot t\right)} \cdot x + b \cdot c\right) - x \cdot \left(4 \cdot i\right)
\] |
associate-*r* [<=]40.8 | \[ \left(\left(\color{blue}{\left(18 \cdot \left(y \cdot z\right)\right)} \cdot t\right) \cdot x + b \cdot c\right) - x \cdot \left(4 \cdot i\right)
\] |
*-commutative [<=]40.8 | \[ \left(\color{blue}{x \cdot \left(\left(18 \cdot \left(y \cdot z\right)\right) \cdot t\right)} + b \cdot c\right) - x \cdot \left(4 \cdot i\right)
\] |
*-commutative [=>]40.8 | \[ \left(x \cdot \color{blue}{\left(t \cdot \left(18 \cdot \left(y \cdot z\right)\right)\right)} + b \cdot c\right) - x \cdot \left(4 \cdot i\right)
\] |
if -inf.0 < (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) < 3.99999999999999994e307Initial program 0.54
Taylor expanded in x around 0 0.54
Simplified0.66
[Start]0.54 | \[ \left(\left(\left(\left(\left(18 \cdot \left(y \cdot x\right)\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\] |
|---|---|
associate-*r* [=>]0.66 | \[ \left(\left(\left(\left(\color{blue}{\left(\left(18 \cdot y\right) \cdot x\right)} \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\] |
*-commutative [<=]0.66 | \[ \left(\left(\left(\left(\color{blue}{\left(x \cdot \left(18 \cdot y\right)\right)} \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\] |
if 3.99999999999999994e307 < (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) Initial program 98.43
Simplified59.23
[Start]98.43 | \[ \left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\] |
|---|---|
associate--l- [=>]98.43 | \[ \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)}
\] |
associate-+l- [=>]98.43 | \[ \color{blue}{\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(\left(a \cdot 4\right) \cdot t - b \cdot c\right)\right)} - \left(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)
\] |
associate-+l- [<=]98.43 | \[ \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right)} - \left(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)
\] |
distribute-rgt-out-- [=>]98.43 | \[ \left(\color{blue}{t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)} + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)
\] |
associate-*l* [=>]59.23 | \[ \left(t \cdot \left(\color{blue}{\left(x \cdot 18\right) \cdot \left(y \cdot z\right)} - a \cdot 4\right) + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)
\] |
associate-*l* [=>]59.23 | \[ \left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(\color{blue}{x \cdot \left(4 \cdot i\right)} + \left(j \cdot 27\right) \cdot k\right)
\] |
associate-*l* [=>]59.23 | \[ \left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + \color{blue}{j \cdot \left(27 \cdot k\right)}\right)
\] |
Taylor expanded in x around inf 63.95
Simplified63.95
[Start]63.95 | \[ \left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - 4 \cdot \left(i \cdot x\right)
\] |
|---|---|
associate-*r* [=>]63.95 | \[ \left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \color{blue}{\left(4 \cdot i\right) \cdot x}
\] |
*-commutative [<=]63.95 | \[ \left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \color{blue}{x \cdot \left(4 \cdot i\right)}
\] |
Taylor expanded in x around inf 33.85
Simplified37.35
[Start]33.85 | \[ \left(18 \cdot \left(y \cdot \left(t \cdot \left(z \cdot x\right)\right)\right) + b \cdot c\right) - x \cdot \left(4 \cdot i\right)
\] |
|---|---|
associate-*r* [=>]34.46 | \[ \left(\color{blue}{\left(18 \cdot y\right) \cdot \left(t \cdot \left(z \cdot x\right)\right)} + b \cdot c\right) - x \cdot \left(4 \cdot i\right)
\] |
associate-*r* [=>]21.77 | \[ \left(\left(18 \cdot y\right) \cdot \color{blue}{\left(\left(t \cdot z\right) \cdot x\right)} + b \cdot c\right) - x \cdot \left(4 \cdot i\right)
\] |
associate-*r* [=>]23.62 | \[ \left(\color{blue}{\left(\left(18 \cdot y\right) \cdot \left(t \cdot z\right)\right) \cdot x} + b \cdot c\right) - x \cdot \left(4 \cdot i\right)
\] |
*-commutative [=>]23.62 | \[ \left(\left(\left(18 \cdot y\right) \cdot \color{blue}{\left(z \cdot t\right)}\right) \cdot x + b \cdot c\right) - x \cdot \left(4 \cdot i\right)
\] |
associate-*l* [<=]37.61 | \[ \left(\color{blue}{\left(\left(\left(18 \cdot y\right) \cdot z\right) \cdot t\right)} \cdot x + b \cdot c\right) - x \cdot \left(4 \cdot i\right)
\] |
associate-*r* [<=]37.35 | \[ \left(\left(\color{blue}{\left(18 \cdot \left(y \cdot z\right)\right)} \cdot t\right) \cdot x + b \cdot c\right) - x \cdot \left(4 \cdot i\right)
\] |
*-commutative [<=]37.35 | \[ \left(\color{blue}{x \cdot \left(\left(18 \cdot \left(y \cdot z\right)\right) \cdot t\right)} + b \cdot c\right) - x \cdot \left(4 \cdot i\right)
\] |
*-commutative [=>]37.35 | \[ \left(x \cdot \color{blue}{\left(t \cdot \left(18 \cdot \left(y \cdot z\right)\right)\right)} + b \cdot c\right) - x \cdot \left(4 \cdot i\right)
\] |
Taylor expanded in x around 0 23.04
Final simplification3.1
| Alternative 1 | |
|---|---|
| Error | 49.88% |
| Cost | 2289 |
| Alternative 2 | |
|---|---|
| Error | 49.84% |
| Cost | 2289 |
| Alternative 3 | |
|---|---|
| Error | 49.84% |
| Cost | 2289 |
| Alternative 4 | |
|---|---|
| Error | 51.72% |
| Cost | 2156 |
| Alternative 5 | |
|---|---|
| Error | 7.05% |
| Cost | 2121 |
| Alternative 6 | |
|---|---|
| Error | 14.17% |
| Cost | 1737 |
| Alternative 7 | |
|---|---|
| Error | 47.78% |
| Cost | 1628 |
| Alternative 8 | |
|---|---|
| Error | 15.36% |
| Cost | 1609 |
| Alternative 9 | |
|---|---|
| Error | 46.76% |
| Cost | 1496 |
| Alternative 10 | |
|---|---|
| Error | 31.43% |
| Cost | 1360 |
| Alternative 11 | |
|---|---|
| Error | 68.33% |
| Cost | 1244 |
| Alternative 12 | |
|---|---|
| Error | 68.38% |
| Cost | 1244 |
| Alternative 13 | |
|---|---|
| Error | 25.45% |
| Cost | 1225 |
| Alternative 14 | |
|---|---|
| Error | 54.12% |
| Cost | 1106 |
| Alternative 15 | |
|---|---|
| Error | 50.97% |
| Cost | 1104 |
| Alternative 16 | |
|---|---|
| Error | 68.47% |
| Cost | 716 |
| Alternative 17 | |
|---|---|
| Error | 66.32% |
| Cost | 585 |
| Alternative 18 | |
|---|---|
| Error | 74.99% |
| Cost | 192 |
herbie shell --seed 2023090
(FPCore (x y z t a b c i j k)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, E"
:precision binary64
:herbie-target
(if (< t -1.6210815397541398e-69) (- (- (* (* 18.0 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4.0)) (- (* (* k j) 27.0) (* c b))) (if (< t 165.68027943805222) (+ (- (* (* 18.0 y) (* x (* z t))) (* (+ (* a t) (* i x)) 4.0)) (- (* c b) (* 27.0 (* k j)))) (- (- (* (* 18.0 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4.0)) (- (* (* k j) 27.0) (* c b)))))
(- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))