| Alternative 1 | |
|---|---|
| Error | 8.9 |
| Cost | 12680 |
(FPCore (x y z t a b c i j) :precision binary64 (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (* j (- (* c t) (* i y)))))
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* x (- (* y z) (* t a))))
(t_2 (* b (- (* a i) (* z c))))
(t_3 (- (* t c) (* y i)))
(t_4 (* j t_3))
(t_5 (+ t_4 (+ t_1 t_2))))
(if (<= t_5 (- INFINITY))
(+
(fma t_3 j (fma -1.0 (* z (- (* b c) (* x y))) (* a (* t (- x)))))
(* i (* a b)))
(if (<= t_5 INFINITY)
(+ (+ t_1 (- t_2 (* b (fma (- a) i (* a i))))) t_4)
(+ (* t (- (* c j) (* x a))) (+ (* y (- (* x z) (* i j))) t_2))))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)));
}
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = x * ((y * z) - (t * a));
double t_2 = b * ((a * i) - (z * c));
double t_3 = (t * c) - (y * i);
double t_4 = j * t_3;
double t_5 = t_4 + (t_1 + t_2);
double tmp;
if (t_5 <= -((double) INFINITY)) {
tmp = fma(t_3, j, fma(-1.0, (z * ((b * c) - (x * y))), (a * (t * -x)))) + (i * (a * b));
} else if (t_5 <= ((double) INFINITY)) {
tmp = (t_1 + (t_2 - (b * fma(-a, i, (a * i))))) + t_4;
} else {
tmp = (t * ((c * j) - (x * a))) + ((y * ((x * z) - (i * j))) + t_2);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) return Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(c * z) - Float64(i * a)))) + Float64(j * Float64(Float64(c * t) - Float64(i * y)))) end
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(x * Float64(Float64(y * z) - Float64(t * a))) t_2 = Float64(b * Float64(Float64(a * i) - Float64(z * c))) t_3 = Float64(Float64(t * c) - Float64(y * i)) t_4 = Float64(j * t_3) t_5 = Float64(t_4 + Float64(t_1 + t_2)) tmp = 0.0 if (t_5 <= Float64(-Inf)) tmp = Float64(fma(t_3, j, fma(-1.0, Float64(z * Float64(Float64(b * c) - Float64(x * y))), Float64(a * Float64(t * Float64(-x))))) + Float64(i * Float64(a * b))); elseif (t_5 <= Inf) tmp = Float64(Float64(t_1 + Float64(t_2 - Float64(b * fma(Float64(-a), i, Float64(a * i))))) + t_4); else tmp = Float64(Float64(t * Float64(Float64(c * j) - Float64(x * a))) + Float64(Float64(y * Float64(Float64(x * z) - Float64(i * j))) + t_2)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(c * z), $MachinePrecision] - N[(i * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(b * N[(N[(a * i), $MachinePrecision] - N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t * c), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(j * t$95$3), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$4 + N[(t$95$1 + t$95$2), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$5, (-Infinity)], N[(N[(t$95$3 * j + N[(-1.0 * N[(z * N[(N[(b * c), $MachinePrecision] - N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(t * (-x)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(i * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$5, Infinity], N[(N[(t$95$1 + N[(t$95$2 - N[(b * N[((-a) * i + N[(a * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$4), $MachinePrecision], N[(N[(t * N[(N[(c * j), $MachinePrecision] - N[(x * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(y * N[(N[(x * z), $MachinePrecision] - N[(i * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision]]]]]]]]
\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right)
\begin{array}{l}
t_1 := x \cdot \left(y \cdot z - t \cdot a\right)\\
t_2 := b \cdot \left(a \cdot i - z \cdot c\right)\\
t_3 := t \cdot c - y \cdot i\\
t_4 := j \cdot t_3\\
t_5 := t_4 + \left(t_1 + t_2\right)\\
\mathbf{if}\;t_5 \leq -\infty:\\
\;\;\;\;\mathsf{fma}\left(t_3, j, \mathsf{fma}\left(-1, z \cdot \left(b \cdot c - x \cdot y\right), a \cdot \left(t \cdot \left(-x\right)\right)\right)\right) + i \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;t_5 \leq \infty:\\
\;\;\;\;\left(t_1 + \left(t_2 - b \cdot \mathsf{fma}\left(-a, i, a \cdot i\right)\right)\right) + t_4\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(c \cdot j - x \cdot a\right) + \left(y \cdot \left(x \cdot z - i \cdot j\right) + t_2\right)\\
\end{array}
| Original | 12.0 |
|---|---|
| Target | 16.3 |
| Herbie | 8.7 |
if (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 i a)))) (*.f64 j (-.f64 (*.f64 c t) (*.f64 i y)))) < -inf.0Initial program 64.0
Simplified64.0
[Start]64.0 | \[ \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right)
\] |
|---|---|
+-commutative [=>]64.0 | \[ \color{blue}{j \cdot \left(c \cdot t - i \cdot y\right) + \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right)}
\] |
fma-def [=>]64.0 | \[ \color{blue}{\mathsf{fma}\left(j, c \cdot t - i \cdot y, x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right)}
\] |
*-commutative [=>]64.0 | \[ \mathsf{fma}\left(j, \color{blue}{t \cdot c} - i \cdot y, x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right)
\] |
*-commutative [=>]64.0 | \[ \mathsf{fma}\left(j, t \cdot c - \color{blue}{y \cdot i}, x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right)
\] |
*-commutative [=>]64.0 | \[ \mathsf{fma}\left(j, t \cdot c - y \cdot i, x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(\color{blue}{z \cdot c} - i \cdot a\right)\right)
\] |
*-commutative [=>]64.0 | \[ \mathsf{fma}\left(j, t \cdot c - y \cdot i, x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(z \cdot c - \color{blue}{a \cdot i}\right)\right)
\] |
Taylor expanded in z around -inf 24.2
Simplified26.0
[Start]24.2 | \[ \left(\left(c \cdot t - i \cdot y\right) \cdot j + \left(-1 \cdot \left(z \cdot \left(-1 \cdot \left(y \cdot x\right) - -1 \cdot \left(c \cdot b\right)\right)\right) + -1 \cdot \left(a \cdot \left(t \cdot x\right)\right)\right)\right) - -1 \cdot \left(a \cdot \left(i \cdot b\right)\right)
\] |
|---|---|
fma-def [=>]24.2 | \[ \color{blue}{\mathsf{fma}\left(c \cdot t - i \cdot y, j, -1 \cdot \left(z \cdot \left(-1 \cdot \left(y \cdot x\right) - -1 \cdot \left(c \cdot b\right)\right)\right) + -1 \cdot \left(a \cdot \left(t \cdot x\right)\right)\right)} - -1 \cdot \left(a \cdot \left(i \cdot b\right)\right)
\] |
fma-def [=>]24.2 | \[ \mathsf{fma}\left(c \cdot t - i \cdot y, j, \color{blue}{\mathsf{fma}\left(-1, z \cdot \left(-1 \cdot \left(y \cdot x\right) - -1 \cdot \left(c \cdot b\right)\right), -1 \cdot \left(a \cdot \left(t \cdot x\right)\right)\right)}\right) - -1 \cdot \left(a \cdot \left(i \cdot b\right)\right)
\] |
distribute-lft-out-- [=>]24.2 | \[ \mathsf{fma}\left(c \cdot t - i \cdot y, j, \mathsf{fma}\left(-1, z \cdot \color{blue}{\left(-1 \cdot \left(y \cdot x - c \cdot b\right)\right)}, -1 \cdot \left(a \cdot \left(t \cdot x\right)\right)\right)\right) - -1 \cdot \left(a \cdot \left(i \cdot b\right)\right)
\] |
*-commutative [=>]24.2 | \[ \mathsf{fma}\left(c \cdot t - i \cdot y, j, \mathsf{fma}\left(-1, z \cdot \left(-1 \cdot \left(y \cdot x - \color{blue}{b \cdot c}\right)\right), -1 \cdot \left(a \cdot \left(t \cdot x\right)\right)\right)\right) - -1 \cdot \left(a \cdot \left(i \cdot b\right)\right)
\] |
associate-*r* [=>]24.2 | \[ \mathsf{fma}\left(c \cdot t - i \cdot y, j, \mathsf{fma}\left(-1, z \cdot \left(-1 \cdot \left(y \cdot x - b \cdot c\right)\right), \color{blue}{\left(-1 \cdot a\right) \cdot \left(t \cdot x\right)}\right)\right) - -1 \cdot \left(a \cdot \left(i \cdot b\right)\right)
\] |
neg-mul-1 [<=]24.2 | \[ \mathsf{fma}\left(c \cdot t - i \cdot y, j, \mathsf{fma}\left(-1, z \cdot \left(-1 \cdot \left(y \cdot x - b \cdot c\right)\right), \color{blue}{\left(-a\right)} \cdot \left(t \cdot x\right)\right)\right) - -1 \cdot \left(a \cdot \left(i \cdot b\right)\right)
\] |
*-commutative [=>]24.2 | \[ \mathsf{fma}\left(c \cdot t - i \cdot y, j, \mathsf{fma}\left(-1, z \cdot \left(-1 \cdot \left(y \cdot x - b \cdot c\right)\right), \left(-a\right) \cdot \left(t \cdot x\right)\right)\right) - -1 \cdot \color{blue}{\left(\left(i \cdot b\right) \cdot a\right)}
\] |
associate-*r* [=>]24.2 | \[ \mathsf{fma}\left(c \cdot t - i \cdot y, j, \mathsf{fma}\left(-1, z \cdot \left(-1 \cdot \left(y \cdot x - b \cdot c\right)\right), \left(-a\right) \cdot \left(t \cdot x\right)\right)\right) - \color{blue}{\left(-1 \cdot \left(i \cdot b\right)\right) \cdot a}
\] |
associate-*r* [=>]24.2 | \[ \mathsf{fma}\left(c \cdot t - i \cdot y, j, \mathsf{fma}\left(-1, z \cdot \left(-1 \cdot \left(y \cdot x - b \cdot c\right)\right), \left(-a\right) \cdot \left(t \cdot x\right)\right)\right) - \color{blue}{\left(\left(-1 \cdot i\right) \cdot b\right)} \cdot a
\] |
neg-mul-1 [<=]24.2 | \[ \mathsf{fma}\left(c \cdot t - i \cdot y, j, \mathsf{fma}\left(-1, z \cdot \left(-1 \cdot \left(y \cdot x - b \cdot c\right)\right), \left(-a\right) \cdot \left(t \cdot x\right)\right)\right) - \left(\color{blue}{\left(-i\right)} \cdot b\right) \cdot a
\] |
associate-*r* [<=]26.0 | \[ \mathsf{fma}\left(c \cdot t - i \cdot y, j, \mathsf{fma}\left(-1, z \cdot \left(-1 \cdot \left(y \cdot x - b \cdot c\right)\right), \left(-a\right) \cdot \left(t \cdot x\right)\right)\right) - \color{blue}{\left(-i\right) \cdot \left(b \cdot a\right)}
\] |
if -inf.0 < (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 i a)))) (*.f64 j (-.f64 (*.f64 c t) (*.f64 i y)))) < +inf.0Initial program 6.5
Applied egg-rr6.5
if +inf.0 < (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 i a)))) (*.f64 j (-.f64 (*.f64 c t) (*.f64 i y)))) Initial program 64.0
Simplified64.0
[Start]64.0 | \[ \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right)
\] |
|---|---|
+-commutative [=>]64.0 | \[ \color{blue}{j \cdot \left(c \cdot t - i \cdot y\right) + \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right)}
\] |
fma-def [=>]64.0 | \[ \color{blue}{\mathsf{fma}\left(j, c \cdot t - i \cdot y, x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right)}
\] |
*-commutative [=>]64.0 | \[ \mathsf{fma}\left(j, \color{blue}{t \cdot c} - i \cdot y, x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right)
\] |
*-commutative [=>]64.0 | \[ \mathsf{fma}\left(j, t \cdot c - \color{blue}{y \cdot i}, x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right)
\] |
*-commutative [=>]64.0 | \[ \mathsf{fma}\left(j, t \cdot c - y \cdot i, x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(\color{blue}{z \cdot c} - i \cdot a\right)\right)
\] |
*-commutative [=>]64.0 | \[ \mathsf{fma}\left(j, t \cdot c - y \cdot i, x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(z \cdot c - \color{blue}{a \cdot i}\right)\right)
\] |
Taylor expanded in y around -inf 45.5
Simplified44.1
[Start]45.5 | \[ \left(c \cdot \left(t \cdot j\right) + \left(-1 \cdot \left(a \cdot \left(t \cdot x\right)\right) + -1 \cdot \left(y \cdot \left(i \cdot j + -1 \cdot \left(z \cdot x\right)\right)\right)\right)\right) - \left(c \cdot z - i \cdot a\right) \cdot b
\] |
|---|---|
cancel-sign-sub-inv [=>]45.5 | \[ \color{blue}{\left(c \cdot \left(t \cdot j\right) + \left(-1 \cdot \left(a \cdot \left(t \cdot x\right)\right) + -1 \cdot \left(y \cdot \left(i \cdot j + -1 \cdot \left(z \cdot x\right)\right)\right)\right)\right) + \left(-\left(c \cdot z - i \cdot a\right)\right) \cdot b}
\] |
*-commutative [=>]45.5 | \[ \left(c \cdot \left(t \cdot j\right) + \left(-1 \cdot \left(a \cdot \left(t \cdot x\right)\right) + -1 \cdot \left(y \cdot \left(i \cdot j + -1 \cdot \left(z \cdot x\right)\right)\right)\right)\right) + \left(-\left(\color{blue}{z \cdot c} - i \cdot a\right)\right) \cdot b
\] |
*-commutative [=>]45.5 | \[ \left(c \cdot \left(t \cdot j\right) + \left(-1 \cdot \left(a \cdot \left(t \cdot x\right)\right) + -1 \cdot \left(y \cdot \left(i \cdot j + -1 \cdot \left(z \cdot x\right)\right)\right)\right)\right) + \left(-\left(z \cdot c - \color{blue}{a \cdot i}\right)\right) \cdot b
\] |
*-commutative [<=]45.5 | \[ \left(c \cdot \left(t \cdot j\right) + \left(-1 \cdot \left(a \cdot \left(t \cdot x\right)\right) + -1 \cdot \left(y \cdot \left(i \cdot j + -1 \cdot \left(z \cdot x\right)\right)\right)\right)\right) + \color{blue}{b \cdot \left(-\left(z \cdot c - a \cdot i\right)\right)}
\] |
associate-+r+ [=>]45.5 | \[ \color{blue}{\left(\left(c \cdot \left(t \cdot j\right) + -1 \cdot \left(a \cdot \left(t \cdot x\right)\right)\right) + -1 \cdot \left(y \cdot \left(i \cdot j + -1 \cdot \left(z \cdot x\right)\right)\right)\right)} + b \cdot \left(-\left(z \cdot c - a \cdot i\right)\right)
\] |
mul-1-neg [=>]45.5 | \[ \left(\left(c \cdot \left(t \cdot j\right) + -1 \cdot \left(a \cdot \left(t \cdot x\right)\right)\right) + \color{blue}{\left(-y \cdot \left(i \cdot j + -1 \cdot \left(z \cdot x\right)\right)\right)}\right) + b \cdot \left(-\left(z \cdot c - a \cdot i\right)\right)
\] |
unsub-neg [=>]45.5 | \[ \color{blue}{\left(\left(c \cdot \left(t \cdot j\right) + -1 \cdot \left(a \cdot \left(t \cdot x\right)\right)\right) - y \cdot \left(i \cdot j + -1 \cdot \left(z \cdot x\right)\right)\right)} + b \cdot \left(-\left(z \cdot c - a \cdot i\right)\right)
\] |
associate-+l- [=>]45.5 | \[ \color{blue}{\left(c \cdot \left(t \cdot j\right) + -1 \cdot \left(a \cdot \left(t \cdot x\right)\right)\right) - \left(y \cdot \left(i \cdot j + -1 \cdot \left(z \cdot x\right)\right) - b \cdot \left(-\left(z \cdot c - a \cdot i\right)\right)\right)}
\] |
*-commutative [=>]45.5 | \[ \left(c \cdot \color{blue}{\left(j \cdot t\right)} + -1 \cdot \left(a \cdot \left(t \cdot x\right)\right)\right) - \left(y \cdot \left(i \cdot j + -1 \cdot \left(z \cdot x\right)\right) - b \cdot \left(-\left(z \cdot c - a \cdot i\right)\right)\right)
\] |
associate-*r* [=>]44.1 | \[ \left(\color{blue}{\left(c \cdot j\right) \cdot t} + -1 \cdot \left(a \cdot \left(t \cdot x\right)\right)\right) - \left(y \cdot \left(i \cdot j + -1 \cdot \left(z \cdot x\right)\right) - b \cdot \left(-\left(z \cdot c - a \cdot i\right)\right)\right)
\] |
associate-*r* [=>]44.1 | \[ \left(\left(c \cdot j\right) \cdot t + \color{blue}{\left(-1 \cdot a\right) \cdot \left(t \cdot x\right)}\right) - \left(y \cdot \left(i \cdot j + -1 \cdot \left(z \cdot x\right)\right) - b \cdot \left(-\left(z \cdot c - a \cdot i\right)\right)\right)
\] |
*-commutative [=>]44.1 | \[ \left(\left(c \cdot j\right) \cdot t + \left(-1 \cdot a\right) \cdot \color{blue}{\left(x \cdot t\right)}\right) - \left(y \cdot \left(i \cdot j + -1 \cdot \left(z \cdot x\right)\right) - b \cdot \left(-\left(z \cdot c - a \cdot i\right)\right)\right)
\] |
associate-*r* [=>]44.1 | \[ \left(\left(c \cdot j\right) \cdot t + \color{blue}{\left(\left(-1 \cdot a\right) \cdot x\right) \cdot t}\right) - \left(y \cdot \left(i \cdot j + -1 \cdot \left(z \cdot x\right)\right) - b \cdot \left(-\left(z \cdot c - a \cdot i\right)\right)\right)
\] |
associate-*r* [<=]44.1 | \[ \left(\left(c \cdot j\right) \cdot t + \color{blue}{\left(-1 \cdot \left(a \cdot x\right)\right)} \cdot t\right) - \left(y \cdot \left(i \cdot j + -1 \cdot \left(z \cdot x\right)\right) - b \cdot \left(-\left(z \cdot c - a \cdot i\right)\right)\right)
\] |
distribute-rgt-in [<=]44.1 | \[ \color{blue}{t \cdot \left(c \cdot j + -1 \cdot \left(a \cdot x\right)\right)} - \left(y \cdot \left(i \cdot j + -1 \cdot \left(z \cdot x\right)\right) - b \cdot \left(-\left(z \cdot c - a \cdot i\right)\right)\right)
\] |
mul-1-neg [=>]44.1 | \[ t \cdot \left(c \cdot j + \color{blue}{\left(-a \cdot x\right)}\right) - \left(y \cdot \left(i \cdot j + -1 \cdot \left(z \cdot x\right)\right) - b \cdot \left(-\left(z \cdot c - a \cdot i\right)\right)\right)
\] |
unsub-neg [=>]44.1 | \[ t \cdot \color{blue}{\left(c \cdot j - a \cdot x\right)} - \left(y \cdot \left(i \cdot j + -1 \cdot \left(z \cdot x\right)\right) - b \cdot \left(-\left(z \cdot c - a \cdot i\right)\right)\right)
\] |
mul-1-neg [=>]44.1 | \[ t \cdot \left(c \cdot j - a \cdot x\right) - \left(y \cdot \left(i \cdot j + \color{blue}{\left(-z \cdot x\right)}\right) - b \cdot \left(-\left(z \cdot c - a \cdot i\right)\right)\right)
\] |
unsub-neg [=>]44.1 | \[ t \cdot \left(c \cdot j - a \cdot x\right) - \left(y \cdot \color{blue}{\left(i \cdot j - z \cdot x\right)} - b \cdot \left(-\left(z \cdot c - a \cdot i\right)\right)\right)
\] |
neg-sub0 [=>]44.1 | \[ t \cdot \left(c \cdot j - a \cdot x\right) - \left(y \cdot \left(i \cdot j - z \cdot x\right) - b \cdot \color{blue}{\left(0 - \left(z \cdot c - a \cdot i\right)\right)}\right)
\] |
associate--r- [=>]44.1 | \[ t \cdot \left(c \cdot j - a \cdot x\right) - \left(y \cdot \left(i \cdot j - z \cdot x\right) - b \cdot \color{blue}{\left(\left(0 - z \cdot c\right) + a \cdot i\right)}\right)
\] |
neg-sub0 [<=]44.1 | \[ t \cdot \left(c \cdot j - a \cdot x\right) - \left(y \cdot \left(i \cdot j - z \cdot x\right) - b \cdot \left(\color{blue}{\left(-z \cdot c\right)} + a \cdot i\right)\right)
\] |
+-commutative [<=]44.1 | \[ t \cdot \left(c \cdot j - a \cdot x\right) - \left(y \cdot \left(i \cdot j - z \cdot x\right) - b \cdot \color{blue}{\left(a \cdot i + \left(-z \cdot c\right)\right)}\right)
\] |
sub-neg [<=]44.1 | \[ t \cdot \left(c \cdot j - a \cdot x\right) - \left(y \cdot \left(i \cdot j - z \cdot x\right) - b \cdot \color{blue}{\left(a \cdot i - z \cdot c\right)}\right)
\] |
*-commutative [<=]44.1 | \[ t \cdot \left(c \cdot j - a \cdot x\right) - \left(y \cdot \left(i \cdot j - z \cdot x\right) - b \cdot \left(a \cdot i - \color{blue}{c \cdot z}\right)\right)
\] |
Final simplification8.7
| Alternative 1 | |
|---|---|
| Error | 8.9 |
| Cost | 12680 |
| Alternative 2 | |
|---|---|
| Error | 8.9 |
| Cost | 11976 |
| Alternative 3 | |
|---|---|
| Error | 8.4 |
| Cost | 5704 |
| Alternative 4 | |
|---|---|
| Error | 8.8 |
| Cost | 5704 |
| Alternative 5 | |
|---|---|
| Error | 8.9 |
| Cost | 5704 |
| Alternative 6 | |
|---|---|
| Error | 20.8 |
| Cost | 3185 |
| Alternative 7 | |
|---|---|
| Error | 36.7 |
| Cost | 2540 |
| Alternative 8 | |
|---|---|
| Error | 21.5 |
| Cost | 2532 |
| Alternative 9 | |
|---|---|
| Error | 21.4 |
| Cost | 2532 |
| Alternative 10 | |
|---|---|
| Error | 34.3 |
| Cost | 2408 |
| Alternative 11 | |
|---|---|
| Error | 21.2 |
| Cost | 2404 |
| Alternative 12 | |
|---|---|
| Error | 43.4 |
| Cost | 2292 |
| Alternative 13 | |
|---|---|
| Error | 42.9 |
| Cost | 2292 |
| Alternative 14 | |
|---|---|
| Error | 27.3 |
| Cost | 2273 |
| Alternative 15 | |
|---|---|
| Error | 37.8 |
| Cost | 2160 |
| Alternative 16 | |
|---|---|
| Error | 20.5 |
| Cost | 2140 |
| Alternative 17 | |
|---|---|
| Error | 21.5 |
| Cost | 2140 |
| Alternative 18 | |
|---|---|
| Error | 51.2 |
| Cost | 2100 |
| Alternative 19 | |
|---|---|
| Error | 37.4 |
| Cost | 2029 |
| Alternative 20 | |
|---|---|
| Error | 24.5 |
| Cost | 2011 |
| Alternative 21 | |
|---|---|
| Error | 16.7 |
| Cost | 1996 |
| Alternative 22 | |
|---|---|
| Error | 47.5 |
| Cost | 1896 |
| Alternative 23 | |
|---|---|
| Error | 38.8 |
| Cost | 1896 |
| Alternative 24 | |
|---|---|
| Error | 37.8 |
| Cost | 1896 |
| Alternative 25 | |
|---|---|
| Error | 37.8 |
| Cost | 1896 |
| Alternative 26 | |
|---|---|
| Error | 37.7 |
| Cost | 1896 |
| Alternative 27 | |
|---|---|
| Error | 50.1 |
| Cost | 1836 |
| Alternative 28 | |
|---|---|
| Error | 21.3 |
| Cost | 1745 |
| Alternative 29 | |
|---|---|
| Error | 51.0 |
| Cost | 1704 |
| Alternative 30 | |
|---|---|
| Error | 49.4 |
| Cost | 1441 |
| Alternative 31 | |
|---|---|
| Error | 41.6 |
| Cost | 1368 |
| Alternative 32 | |
|---|---|
| Error | 50.6 |
| Cost | 1244 |
| Alternative 33 | |
|---|---|
| Error | 51.1 |
| Cost | 850 |
| Alternative 34 | |
|---|---|
| Error | 53.1 |
| Cost | 585 |
| Alternative 35 | |
|---|---|
| Error | 50.5 |
| Cost | 585 |
| Alternative 36 | |
|---|---|
| Error | 54.0 |
| Cost | 320 |
herbie shell --seed 2022364
(FPCore (x y z t a b c i j)
:name "Linear.Matrix:det33 from linear-1.19.1.3"
:precision binary64
:herbie-target
(if (< t -8.120978919195912e-33) (- (* x (- (* z y) (* a t))) (- (* b (- (* z c) (* a i))) (* (- (* c t) (* y i)) j))) (if (< t -4.712553818218485e-169) (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (/ (* j (- (pow (* c t) 2.0) (pow (* i y) 2.0))) (+ (* c t) (* i y)))) (if (< t -7.633533346031584e-308) (- (* x (- (* z y) (* a t))) (- (* b (- (* z c) (* a i))) (* (- (* c t) (* y i)) j))) (if (< t 1.0535888557455487e-139) (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (/ (* j (- (pow (* c t) 2.0) (pow (* i y) 2.0))) (+ (* c t) (* i y)))) (- (* x (- (* z y) (* a t))) (- (* b (- (* z c) (* a i))) (* (- (* c t) (* y i)) j)))))))
(+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (* j (- (* c t) (* i y)))))