Data.Colour.Matrix:determinant from colour-2.3.3, A

?

Percentage Accurate: 72.6% → 83.2%
Time: 26.1s
Precision: binary64
Cost: 21700

?

\[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
\[\begin{array}{l} t_1 := x \cdot \left(y \cdot z - t \cdot a\right) + b \cdot \left(t \cdot i - z \cdot c\right)\\ t_2 := a \cdot c - y \cdot i\\ \mathbf{if}\;t_1 + j \cdot t_2 \leq \infty:\\ \;\;\;\;\mathsf{fma}\left(j, t_2, t_1\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \sqrt[3]{{\left(\mathsf{fma}\left(z, x, i \cdot \left(-j\right)\right)\right)}^{3}}\\ \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (+
  (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* t i))))
  (* j (- (* c a) (* y i)))))
(FPCore (x y z t a b c i j)
 :precision binary64
 (let* ((t_1 (+ (* x (- (* y z) (* t a))) (* b (- (* t i) (* z c)))))
        (t_2 (- (* a c) (* y i))))
   (if (<= (+ t_1 (* j t_2)) INFINITY)
     (fma j t_2 t_1)
     (* y (cbrt (pow (fma z x (* i (- j))) 3.0))))))
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) - (t * i)))) + (j * ((c * a) - (y * i)));
}
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))) + (b * ((t * i) - (z * c)));
	double t_2 = (a * c) - (y * i);
	double tmp;
	if ((t_1 + (j * t_2)) <= ((double) INFINITY)) {
		tmp = fma(j, t_2, t_1);
	} else {
		tmp = y * cbrt(pow(fma(z, x, (i * -j)), 3.0));
	}
	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(t * i)))) + Float64(j * Float64(Float64(c * a) - Float64(y * i))))
end
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) + Float64(b * Float64(Float64(t * i) - Float64(z * c))))
	t_2 = Float64(Float64(a * c) - Float64(y * i))
	tmp = 0.0
	if (Float64(t_1 + Float64(j * t_2)) <= Inf)
		tmp = fma(j, t_2, t_1);
	else
		tmp = Float64(y * cbrt((fma(z, x, Float64(i * Float64(-j))) ^ 3.0)));
	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[(t * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[(N[(t * i), $MachinePrecision] - N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(a * c), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t$95$1 + N[(j * t$95$2), $MachinePrecision]), $MachinePrecision], Infinity], N[(j * t$95$2 + t$95$1), $MachinePrecision], N[(y * N[Power[N[Power[N[(z * x + N[(i * (-j)), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]]]]
\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right)
\begin{array}{l}
t_1 := x \cdot \left(y \cdot z - t \cdot a\right) + b \cdot \left(t \cdot i - z \cdot c\right)\\
t_2 := a \cdot c - y \cdot i\\
\mathbf{if}\;t_1 + j \cdot t_2 \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(j, t_2, t_1\right)\\

\mathbf{else}:\\
\;\;\;\;y \cdot \sqrt[3]{{\left(\mathsf{fma}\left(z, x, i \cdot \left(-j\right)\right)\right)}^{3}}\\


\end{array}

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Herbie found 25 alternatives:

AlternativeAccuracySpeedup

Accuracy vs Speed

The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Bogosity?

Bogosity

Target

Original72.6%
Target59.2%
Herbie83.2%
\[\begin{array}{l} \mathbf{if}\;x < -1.469694296777705 \cdot 10^{-64}:\\ \;\;\;\;\left(x \cdot \left(y \cdot z - t \cdot a\right) - \frac{b \cdot \left({\left(c \cdot z\right)}^{2} - {\left(t \cdot i\right)}^{2}\right)}{c \cdot z + t \cdot i}\right) + j \cdot \left(c \cdot a - y \cdot i\right)\\ \mathbf{elif}\;x < 3.2113527362226803 \cdot 10^{-147}:\\ \;\;\;\;\left(b \cdot i - x \cdot a\right) \cdot t - \left(z \cdot \left(c \cdot b\right) - j \cdot \left(c \cdot a - y \cdot i\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot \left(y \cdot z - t \cdot a\right) - \frac{b \cdot \left({\left(c \cdot z\right)}^{2} - {\left(t \cdot i\right)}^{2}\right)}{c \cdot z + t \cdot i}\right) + j \cdot \left(c \cdot a - y \cdot i\right)\\ \end{array} \]

Derivation?

  1. Split input into 2 regimes
  2. if (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 t i)))) (*.f64 j (-.f64 (*.f64 c a) (*.f64 y i)))) < +inf.0

    1. Initial program 92.2%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. Simplified92.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(j, a \cdot c - y \cdot i, x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(z \cdot c - t \cdot i\right)\right)} \]
      Step-by-step derivation

      [Start]92.2%

      \[ \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]

      +-commutative [=>]92.2%

      \[ \color{blue}{j \cdot \left(c \cdot a - y \cdot i\right) + \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right)} \]

      fma-def [=>]92.2%

      \[ \color{blue}{\mathsf{fma}\left(j, c \cdot a - y \cdot i, x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right)} \]

      *-commutative [=>]92.2%

      \[ \mathsf{fma}\left(j, \color{blue}{a \cdot c} - y \cdot i, x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) \]

      *-commutative [=>]92.2%

      \[ \mathsf{fma}\left(j, a \cdot c - y \cdot i, x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(\color{blue}{z \cdot c} - t \cdot i\right)\right) \]

    if +inf.0 < (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 t i)))) (*.f64 j (-.f64 (*.f64 c a) (*.f64 y i))))

    1. Initial program 0.0%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. Simplified0.0%

      \[\leadsto \color{blue}{\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(z \cdot c - t \cdot i\right)\right) + j \cdot \left(a \cdot c - y \cdot i\right)} \]
      Step-by-step derivation

      [Start]0.0%

      \[ \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]

      cancel-sign-sub [<=]0.0%

      \[ \color{blue}{\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) - \left(-j\right) \cdot \left(c \cdot a - y \cdot i\right)} \]

      cancel-sign-sub-inv [=>]0.0%

      \[ \color{blue}{\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + \left(-\left(-j\right)\right) \cdot \left(c \cdot a - y \cdot i\right)} \]

      *-commutative [=>]0.0%

      \[ \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(\color{blue}{z \cdot c} - t \cdot i\right)\right) + \left(-\left(-j\right)\right) \cdot \left(c \cdot a - y \cdot i\right) \]

      remove-double-neg [=>]0.0%

      \[ \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(z \cdot c - t \cdot i\right)\right) + \color{blue}{j} \cdot \left(c \cdot a - y \cdot i\right) \]

      *-commutative [=>]0.0%

      \[ \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(z \cdot c - t \cdot i\right)\right) + j \cdot \left(\color{blue}{a \cdot c} - y \cdot i\right) \]
    3. Taylor expanded in y around inf 45.4%

      \[\leadsto \color{blue}{\left(z \cdot x + -1 \cdot \left(i \cdot j\right)\right) \cdot y} \]
    4. Simplified45.4%

      \[\leadsto \color{blue}{y \cdot \left(z \cdot x - i \cdot j\right)} \]
      Step-by-step derivation

      [Start]45.4%

      \[ \left(z \cdot x + -1 \cdot \left(i \cdot j\right)\right) \cdot y \]

      *-commutative [=>]45.4%

      \[ \color{blue}{y \cdot \left(z \cdot x + -1 \cdot \left(i \cdot j\right)\right)} \]

      mul-1-neg [=>]45.4%

      \[ y \cdot \left(z \cdot x + \color{blue}{\left(-i \cdot j\right)}\right) \]

      unsub-neg [=>]45.4%

      \[ y \cdot \color{blue}{\left(z \cdot x - i \cdot j\right)} \]
    5. Applied egg-rr55.5%

      \[\leadsto y \cdot \color{blue}{\sqrt[3]{\left(\mathsf{fma}\left(z, x, -j \cdot i\right) \cdot \mathsf{fma}\left(z, x, -j \cdot i\right)\right) \cdot \mathsf{fma}\left(z, x, -j \cdot i\right)}} \]
      Step-by-step derivation

      [Start]45.4%

      \[ y \cdot \left(z \cdot x - i \cdot j\right) \]

      add-cbrt-cube [=>]55.5%

      \[ y \cdot \color{blue}{\sqrt[3]{\left(\left(z \cdot x - i \cdot j\right) \cdot \left(z \cdot x - i \cdot j\right)\right) \cdot \left(z \cdot x - i \cdot j\right)}} \]

      fma-neg [=>]55.5%

      \[ y \cdot \sqrt[3]{\left(\color{blue}{\mathsf{fma}\left(z, x, -i \cdot j\right)} \cdot \left(z \cdot x - i \cdot j\right)\right) \cdot \left(z \cdot x - i \cdot j\right)} \]

      *-commutative [=>]55.5%

      \[ y \cdot \sqrt[3]{\left(\mathsf{fma}\left(z, x, -\color{blue}{j \cdot i}\right) \cdot \left(z \cdot x - i \cdot j\right)\right) \cdot \left(z \cdot x - i \cdot j\right)} \]

      fma-neg [=>]55.5%

      \[ y \cdot \sqrt[3]{\left(\mathsf{fma}\left(z, x, -j \cdot i\right) \cdot \color{blue}{\mathsf{fma}\left(z, x, -i \cdot j\right)}\right) \cdot \left(z \cdot x - i \cdot j\right)} \]

      *-commutative [=>]55.5%

      \[ y \cdot \sqrt[3]{\left(\mathsf{fma}\left(z, x, -j \cdot i\right) \cdot \mathsf{fma}\left(z, x, -\color{blue}{j \cdot i}\right)\right) \cdot \left(z \cdot x - i \cdot j\right)} \]

      fma-neg [=>]55.5%

      \[ y \cdot \sqrt[3]{\left(\mathsf{fma}\left(z, x, -j \cdot i\right) \cdot \mathsf{fma}\left(z, x, -j \cdot i\right)\right) \cdot \color{blue}{\mathsf{fma}\left(z, x, -i \cdot j\right)}} \]

      *-commutative [=>]55.5%

      \[ y \cdot \sqrt[3]{\left(\mathsf{fma}\left(z, x, -j \cdot i\right) \cdot \mathsf{fma}\left(z, x, -j \cdot i\right)\right) \cdot \mathsf{fma}\left(z, x, -\color{blue}{j \cdot i}\right)} \]
    6. Simplified55.5%

      \[\leadsto y \cdot \color{blue}{\sqrt[3]{{\left(\mathsf{fma}\left(z, x, i \cdot \left(-j\right)\right)\right)}^{3}}} \]
      Step-by-step derivation

      [Start]55.5%

      \[ y \cdot \sqrt[3]{\left(\mathsf{fma}\left(z, x, -j \cdot i\right) \cdot \mathsf{fma}\left(z, x, -j \cdot i\right)\right) \cdot \mathsf{fma}\left(z, x, -j \cdot i\right)} \]

      unpow3 [<=]55.5%

      \[ y \cdot \sqrt[3]{\color{blue}{{\left(\mathsf{fma}\left(z, x, -j \cdot i\right)\right)}^{3}}} \]

      distribute-rgt-neg-in [=>]55.5%

      \[ y \cdot \sqrt[3]{{\left(\mathsf{fma}\left(z, x, \color{blue}{j \cdot \left(-i\right)}\right)\right)}^{3}} \]

      *-commutative [<=]55.5%

      \[ y \cdot \sqrt[3]{{\left(\mathsf{fma}\left(z, x, \color{blue}{\left(-i\right) \cdot j}\right)\right)}^{3}} \]

      distribute-lft-neg-out [=>]55.5%

      \[ y \cdot \sqrt[3]{{\left(\mathsf{fma}\left(z, x, \color{blue}{-i \cdot j}\right)\right)}^{3}} \]

      distribute-rgt-neg-in [=>]55.5%

      \[ y \cdot \sqrt[3]{{\left(\mathsf{fma}\left(z, x, \color{blue}{i \cdot \left(-j\right)}\right)\right)}^{3}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification85.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\left(x \cdot \left(y \cdot z - t \cdot a\right) + b \cdot \left(t \cdot i - z \cdot c\right)\right) + j \cdot \left(a \cdot c - y \cdot i\right) \leq \infty:\\ \;\;\;\;\mathsf{fma}\left(j, a \cdot c - y \cdot i, x \cdot \left(y \cdot z - t \cdot a\right) + b \cdot \left(t \cdot i - z \cdot c\right)\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \sqrt[3]{{\left(\mathsf{fma}\left(z, x, i \cdot \left(-j\right)\right)\right)}^{3}}\\ \end{array} \]

Alternatives

Alternative 1
Accuracy83.2%
Cost21700
\[\begin{array}{l} t_1 := x \cdot \left(y \cdot z - t \cdot a\right) + b \cdot \left(t \cdot i - z \cdot c\right)\\ t_2 := a \cdot c - y \cdot i\\ \mathbf{if}\;t_1 + j \cdot t_2 \leq \infty:\\ \;\;\;\;\mathsf{fma}\left(j, t_2, t_1\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \sqrt[3]{{\left(\mathsf{fma}\left(z, x, i \cdot \left(-j\right)\right)\right)}^{3}}\\ \end{array} \]
Alternative 2
Accuracy81.2%
Cost10052
\[\begin{array}{l} t_1 := x \cdot \left(y \cdot z - t \cdot a\right) + b \cdot \left(t \cdot i - z \cdot c\right)\\ t_2 := a \cdot c - y \cdot i\\ \mathbf{if}\;t_1 + j \cdot t_2 \leq \infty:\\ \;\;\;\;\mathsf{fma}\left(j, t_2, t_1\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b \cdot i - x \cdot a\right)\\ \end{array} \]
Alternative 3
Accuracy81.2%
Cost3780
\[\begin{array}{l} t_1 := \left(x \cdot \left(y \cdot z - t \cdot a\right) + b \cdot \left(t \cdot i - z \cdot c\right)\right) + j \cdot \left(a \cdot c - y \cdot i\right)\\ \mathbf{if}\;t_1 \leq \infty:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b \cdot i - x \cdot a\right)\\ \end{array} \]
Alternative 4
Accuracy64.9%
Cost1744
\[\begin{array}{l} t_1 := x \cdot \left(y \cdot z - t \cdot a\right) + b \cdot \left(t \cdot i - z \cdot c\right)\\ t_2 := j \cdot \left(a \cdot c - y \cdot i\right)\\ \mathbf{if}\;j \leq -2.5 \cdot 10^{+174}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;j \leq -1.1 \cdot 10^{+93}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;j \leq -1.7 \cdot 10^{-46}:\\ \;\;\;\;t_2 + t \cdot \left(b \cdot i\right)\\ \mathbf{elif}\;j \leq 1.2 \cdot 10^{+166}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 5
Accuracy28.4%
Cost1705
\[\begin{array}{l} t_1 := a \cdot \left(c \cdot j\right)\\ \mathbf{if}\;z \leq -4.4 \cdot 10^{+72}:\\ \;\;\;\;x \cdot \left(y \cdot z\right)\\ \mathbf{elif}\;z \leq -2.7 \cdot 10^{-260}:\\ \;\;\;\;b \cdot \left(t \cdot i\right)\\ \mathbf{elif}\;z \leq 1.7 \cdot 10^{-270}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 8.8 \cdot 10^{-206}:\\ \;\;\;\;-t \cdot \left(x \cdot a\right)\\ \mathbf{elif}\;z \leq 1.95 \cdot 10^{-149}:\\ \;\;\;\;c \cdot \left(a \cdot j\right)\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{-80}:\\ \;\;\;\;z \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;z \leq 2.15 \cdot 10^{-7}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 2.35 \cdot 10^{+83} \lor \neg \left(z \leq 3.3 \cdot 10^{+185}\right) \land z \leq 3.2 \cdot 10^{+241}:\\ \;\;\;\;c \cdot \left(z \cdot \left(-b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(x \cdot z\right)\\ \end{array} \]
Alternative 6
Accuracy49.0%
Cost1632
\[\begin{array}{l} t_1 := j \cdot \left(a \cdot c - y \cdot i\right)\\ t_2 := t \cdot \left(b \cdot i - x \cdot a\right)\\ t_3 := b \cdot \left(t \cdot i - z \cdot c\right)\\ \mathbf{if}\;j \leq -7.1 \cdot 10^{+173}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;j \leq -7.1 \cdot 10^{+112}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;j \leq -1.7 \cdot 10^{-54}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;j \leq -2.3 \cdot 10^{-298}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;j \leq 3.6 \cdot 10^{+49}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;j \leq 2.3 \cdot 10^{+93}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;j \leq 2.2 \cdot 10^{+115}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;j \leq 9 \cdot 10^{+190}:\\ \;\;\;\;y \cdot \left(x \cdot z - i \cdot j\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 7
Accuracy48.7%
Cost1632
\[\begin{array}{l} t_1 := t \cdot \left(b \cdot i - x \cdot a\right)\\ t_2 := j \cdot \left(a \cdot c - y \cdot i\right)\\ \mathbf{if}\;j \leq -7.1 \cdot 10^{+173}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;j \leq -7.1 \cdot 10^{+112}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;j \leq -1.7 \cdot 10^{-54}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;j \leq -1.5 \cdot 10^{-297}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;j \leq 3.4 \cdot 10^{+48}:\\ \;\;\;\;b \cdot \left(t \cdot i - z \cdot c\right)\\ \mathbf{elif}\;j \leq 2.3 \cdot 10^{+93}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;j \leq 9 \cdot 10^{+133}:\\ \;\;\;\;z \cdot \left(x \cdot y - b \cdot c\right)\\ \mathbf{elif}\;j \leq 4.8 \cdot 10^{+190}:\\ \;\;\;\;y \cdot \left(x \cdot z - i \cdot j\right)\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 8
Accuracy48.7%
Cost1632
\[\begin{array}{l} t_1 := j \cdot \left(a \cdot c - y \cdot i\right)\\ \mathbf{if}\;j \leq -1.5 \cdot 10^{+174}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;j \leq -4.15 \cdot 10^{+111}:\\ \;\;\;\;x \cdot \left(y \cdot z - t \cdot a\right)\\ \mathbf{elif}\;j \leq -1.9 \cdot 10^{-60}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;j \leq -4 \cdot 10^{-297}:\\ \;\;\;\;t \cdot \left(b \cdot i - x \cdot a\right)\\ \mathbf{elif}\;j \leq 6.8 \cdot 10^{+51}:\\ \;\;\;\;b \cdot \left(t \cdot i - z \cdot c\right)\\ \mathbf{elif}\;j \leq 9.6 \cdot 10^{+92}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;j \leq 7.5 \cdot 10^{+133}:\\ \;\;\;\;z \cdot \left(x \cdot y - b \cdot c\right)\\ \mathbf{elif}\;j \leq 4.4 \cdot 10^{+190}:\\ \;\;\;\;y \cdot \left(x \cdot z - i \cdot j\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 9
Accuracy48.4%
Cost1632
\[\begin{array}{l} t_1 := j \cdot \left(a \cdot c - y \cdot i\right)\\ \mathbf{if}\;j \leq -1.5 \cdot 10^{+174}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;j \leq -7.5 \cdot 10^{+114}:\\ \;\;\;\;x \cdot \left(y \cdot z - t \cdot a\right)\\ \mathbf{elif}\;j \leq -5 \cdot 10^{-63}:\\ \;\;\;\;i \cdot \left(t \cdot b\right) + c \cdot \left(a \cdot j\right)\\ \mathbf{elif}\;j \leq -6.5 \cdot 10^{-297}:\\ \;\;\;\;t \cdot \left(b \cdot i - x \cdot a\right)\\ \mathbf{elif}\;j \leq 4.4 \cdot 10^{+45}:\\ \;\;\;\;b \cdot \left(t \cdot i - z \cdot c\right)\\ \mathbf{elif}\;j \leq 2.5 \cdot 10^{+90}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;j \leq 7.5 \cdot 10^{+133}:\\ \;\;\;\;z \cdot \left(x \cdot y - b \cdot c\right)\\ \mathbf{elif}\;j \leq 4.4 \cdot 10^{+190}:\\ \;\;\;\;y \cdot \left(x \cdot z - i \cdot j\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 10
Accuracy56.4%
Cost1488
\[\begin{array}{l} t_1 := j \cdot \left(a \cdot c - y \cdot i\right) + t \cdot \left(b \cdot i\right)\\ t_2 := z \cdot \left(x \cdot y - b \cdot c\right)\\ \mathbf{if}\;z \leq -1.3 \cdot 10^{+105}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 2.5 \cdot 10^{-270}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 1.9 \cdot 10^{-206}:\\ \;\;\;\;t \cdot \left(b \cdot i - x \cdot a\right)\\ \mathbf{elif}\;z \leq 9.8 \cdot 10^{+76}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 3 \cdot 10^{+184}:\\ \;\;\;\;y \cdot \left(x \cdot z - i \cdot j\right)\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 11
Accuracy28.4%
Cost1441
\[\begin{array}{l} \mathbf{if}\;z \leq -8.8 \cdot 10^{+74}:\\ \;\;\;\;x \cdot \left(y \cdot z\right)\\ \mathbf{elif}\;z \leq -1.15 \cdot 10^{-261}:\\ \;\;\;\;b \cdot \left(t \cdot i\right)\\ \mathbf{elif}\;z \leq 1.9 \cdot 10^{-149}:\\ \;\;\;\;j \cdot \left(a \cdot c\right)\\ \mathbf{elif}\;z \leq 1.25 \cdot 10^{-81}:\\ \;\;\;\;z \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;z \leq 1.16 \cdot 10^{-9}:\\ \;\;\;\;a \cdot \left(c \cdot j\right)\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{+84} \lor \neg \left(z \leq 1.15 \cdot 10^{+187}\right) \land z \leq 1.22 \cdot 10^{+238}:\\ \;\;\;\;c \cdot \left(z \cdot \left(-b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(x \cdot z\right)\\ \end{array} \]
Alternative 12
Accuracy29.1%
Cost1440
\[\begin{array}{l} t_1 := b \cdot \left(t \cdot i\right)\\ \mathbf{if}\;y \leq -3.4 \cdot 10^{+153}:\\ \;\;\;\;z \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;y \leq -1.36 \cdot 10^{+42}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -1.7 \cdot 10^{-77}:\\ \;\;\;\;x \cdot \left(y \cdot z\right)\\ \mathbf{elif}\;y \leq -3.3 \cdot 10^{-271}:\\ \;\;\;\;j \cdot \left(a \cdot c\right)\\ \mathbf{elif}\;y \leq 7.7 \cdot 10^{-265}:\\ \;\;\;\;a \cdot \left(t \cdot \left(-x\right)\right)\\ \mathbf{elif}\;y \leq 7 \cdot 10^{-199}:\\ \;\;\;\;c \cdot \left(a \cdot j\right)\\ \mathbf{elif}\;y \leq 2 \cdot 10^{-107}:\\ \;\;\;\;c \cdot \left(z \cdot \left(-b\right)\right)\\ \mathbf{elif}\;y \leq 1.7 \cdot 10^{-55}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\left(i \cdot j\right) \cdot \left(-y\right)\\ \end{array} \]
Alternative 13
Accuracy30.4%
Cost1308
\[\begin{array}{l} \mathbf{if}\;j \leq -1 \cdot 10^{-54}:\\ \;\;\;\;c \cdot \left(a \cdot j\right)\\ \mathbf{elif}\;j \leq -2.25 \cdot 10^{-184}:\\ \;\;\;\;a \cdot \left(t \cdot \left(-x\right)\right)\\ \mathbf{elif}\;j \leq -2.2 \cdot 10^{-273}:\\ \;\;\;\;t \cdot \left(b \cdot i\right)\\ \mathbf{elif}\;j \leq 3.5 \cdot 10^{-242}:\\ \;\;\;\;x \cdot \left(y \cdot z\right)\\ \mathbf{elif}\;j \leq 1.8 \cdot 10^{-127}:\\ \;\;\;\;\left(z \cdot c\right) \cdot \left(-b\right)\\ \mathbf{elif}\;j \leq 9.6 \cdot 10^{-29}:\\ \;\;\;\;z \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;j \leq 4.8 \cdot 10^{+52}:\\ \;\;\;\;z \cdot \left(c \cdot \left(-b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;i \cdot \left(y \cdot \left(-j\right)\right)\\ \end{array} \]
Alternative 14
Accuracy29.0%
Cost1176
\[\begin{array}{l} t_1 := b \cdot \left(t \cdot i\right)\\ \mathbf{if}\;y \leq -3.4 \cdot 10^{+153}:\\ \;\;\;\;z \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;y \leq -3.25 \cdot 10^{+41}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -1.55 \cdot 10^{-76}:\\ \;\;\;\;x \cdot \left(y \cdot z\right)\\ \mathbf{elif}\;y \leq 1.65 \cdot 10^{-198}:\\ \;\;\;\;j \cdot \left(a \cdot c\right)\\ \mathbf{elif}\;y \leq 2.05 \cdot 10^{-108}:\\ \;\;\;\;c \cdot \left(z \cdot \left(-b\right)\right)\\ \mathbf{elif}\;y \leq 1.4 \cdot 10^{-55}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;i \cdot \left(y \cdot \left(-j\right)\right)\\ \end{array} \]
Alternative 15
Accuracy51.4%
Cost1104
\[\begin{array}{l} t_1 := a \cdot \left(c \cdot j - x \cdot t\right)\\ t_2 := i \cdot \left(t \cdot b - y \cdot j\right)\\ \mathbf{if}\;i \leq -2.9 \cdot 10^{-38}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;i \leq 3.2 \cdot 10^{-156}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;i \leq 50000000000:\\ \;\;\;\;y \cdot \left(x \cdot z - i \cdot j\right)\\ \mathbf{elif}\;i \leq 3.5 \cdot 10^{+48}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 16
Accuracy29.6%
Cost980
\[\begin{array}{l} t_1 := b \cdot \left(t \cdot i\right)\\ t_2 := y \cdot \left(x \cdot z\right)\\ \mathbf{if}\;z \leq -5.2 \cdot 10^{+70}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -4.5 \cdot 10^{-261}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 2.45 \cdot 10^{+16}:\\ \;\;\;\;c \cdot \left(a \cdot j\right)\\ \mathbf{elif}\;z \leq 3.8 \cdot 10^{+73}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 1.65 \cdot 10^{+81}:\\ \;\;\;\;a \cdot \left(c \cdot j\right)\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 17
Accuracy28.3%
Cost980
\[\begin{array}{l} t_1 := j \cdot \left(a \cdot c\right)\\ t_2 := z \cdot \left(x \cdot y\right)\\ \mathbf{if}\;z \leq -3 \cdot 10^{+67}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -9.5 \cdot 10^{-264}:\\ \;\;\;\;b \cdot \left(t \cdot i\right)\\ \mathbf{elif}\;z \leq 1.75 \cdot 10^{-149}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 1.96 \cdot 10^{-81}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 1.65 \cdot 10^{+81}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(x \cdot z\right)\\ \end{array} \]
Alternative 18
Accuracy28.5%
Cost980
\[\begin{array}{l} t_1 := j \cdot \left(a \cdot c\right)\\ \mathbf{if}\;z \leq -3.3 \cdot 10^{+66}:\\ \;\;\;\;x \cdot \left(y \cdot z\right)\\ \mathbf{elif}\;z \leq -3.1 \cdot 10^{-261}:\\ \;\;\;\;b \cdot \left(t \cdot i\right)\\ \mathbf{elif}\;z \leq 1.5 \cdot 10^{-149}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{-82}:\\ \;\;\;\;z \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;z \leq 1.65 \cdot 10^{+81}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(x \cdot z\right)\\ \end{array} \]
Alternative 19
Accuracy52.3%
Cost841
\[\begin{array}{l} \mathbf{if}\;i \leq -3 \cdot 10^{-38} \lor \neg \left(i \leq 3.9 \cdot 10^{+48}\right):\\ \;\;\;\;i \cdot \left(t \cdot b - y \cdot j\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(c \cdot j - x \cdot t\right)\\ \end{array} \]
Alternative 20
Accuracy41.8%
Cost840
\[\begin{array}{l} \mathbf{if}\;i \leq -1.9 \cdot 10^{+56}:\\ \;\;\;\;b \cdot \left(t \cdot i\right)\\ \mathbf{elif}\;i \leq 1.28 \cdot 10^{+154}:\\ \;\;\;\;a \cdot \left(c \cdot j - x \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;i \cdot \left(t \cdot b\right)\\ \end{array} \]
Alternative 21
Accuracy29.4%
Cost716
\[\begin{array}{l} t_1 := y \cdot \left(x \cdot z\right)\\ \mathbf{if}\;z \leq -1.8 \cdot 10^{+70}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -5.5 \cdot 10^{-261}:\\ \;\;\;\;b \cdot \left(t \cdot i\right)\\ \mathbf{elif}\;z \leq 1.65 \cdot 10^{+81}:\\ \;\;\;\;j \cdot \left(a \cdot c\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 22
Accuracy30.0%
Cost585
\[\begin{array}{l} \mathbf{if}\;i \leq -5.6 \cdot 10^{+38} \lor \neg \left(i \leq 9.5 \cdot 10^{+63}\right):\\ \;\;\;\;b \cdot \left(t \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(c \cdot j\right)\\ \end{array} \]
Alternative 23
Accuracy29.7%
Cost585
\[\begin{array}{l} \mathbf{if}\;i \leq -3 \cdot 10^{+41} \lor \neg \left(i \leq 3.9 \cdot 10^{+71}\right):\\ \;\;\;\;b \cdot \left(t \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;c \cdot \left(a \cdot j\right)\\ \end{array} \]
Alternative 24
Accuracy29.5%
Cost584
\[\begin{array}{l} \mathbf{if}\;i \leq -4.6 \cdot 10^{+39}:\\ \;\;\;\;b \cdot \left(t \cdot i\right)\\ \mathbf{elif}\;i \leq 2.9 \cdot 10^{+66}:\\ \;\;\;\;c \cdot \left(a \cdot j\right)\\ \mathbf{else}:\\ \;\;\;\;i \cdot \left(t \cdot b\right)\\ \end{array} \]
Alternative 25
Accuracy22.5%
Cost320
\[a \cdot \left(c \cdot j\right) \]

Reproduce?

herbie shell --seed 2023165 
(FPCore (x y z t a b c i j)
  :name "Data.Colour.Matrix:determinant from colour-2.3.3, A"
  :precision binary64

  :herbie-target
  (if (< x -1.469694296777705e-64) (+ (- (* x (- (* y z) (* t a))) (/ (* b (- (pow (* c z) 2.0) (pow (* t i) 2.0))) (+ (* c z) (* t i)))) (* j (- (* c a) (* y i)))) (if (< x 3.2113527362226803e-147) (- (* (- (* b i) (* x a)) t) (- (* z (* c b)) (* j (- (* c a) (* y i))))) (+ (- (* x (- (* y z) (* t a))) (/ (* b (- (pow (* c z) 2.0) (pow (* t i) 2.0))) (+ (* c z) (* t i)))) (* j (- (* c a) (* y i))))))

  (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* t i)))) (* j (- (* c a) (* y i)))))