Average Error: 12.0 → 12.3
Time: 5.7s
Precision: 64
\[\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} \mathbf{if}\;j \le -5.1018057398415387 \cdot 10^{-198}:\\ \;\;\;\;\mathsf{fma}\left(c \cdot t - i \cdot y, j, x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right)\\ \mathbf{elif}\;j \le 6.5841993071733845 \cdot 10^{-294}:\\ \;\;\;\;\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot 0\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\left(\left(x \cdot y\right) \cdot z + x \cdot \left(-t \cdot a\right)\right) + x \cdot \mathsf{fma}\left(-t, a, t \cdot a\right)\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + \left(j \cdot \mathsf{fma}\left(t, c, -i \cdot y\right) + j \cdot \mathsf{fma}\left(-i, y, i \cdot y\right)\right)\\ \end{array}\]
\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}
\mathbf{if}\;j \le -5.1018057398415387 \cdot 10^{-198}:\\
\;\;\;\;\mathsf{fma}\left(c \cdot t - i \cdot y, j, x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right)\\

\mathbf{elif}\;j \le 6.5841993071733845 \cdot 10^{-294}:\\
\;\;\;\;\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot 0\\

\mathbf{else}:\\
\;\;\;\;\left(\left(\left(\left(x \cdot y\right) \cdot z + x \cdot \left(-t \cdot a\right)\right) + x \cdot \mathsf{fma}\left(-t, a, t \cdot a\right)\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + \left(j \cdot \mathsf{fma}\left(t, c, -i \cdot y\right) + j \cdot \mathsf{fma}\left(-i, y, i \cdot y\right)\right)\\

\end{array}
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 VAR;
	if ((j <= -5.101805739841539e-198)) {
		VAR = fma(((c * t) - (i * y)), j, ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))));
	} else {
		double VAR_1;
		if ((j <= 6.584199307173384e-294)) {
			VAR_1 = (((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * 0.0));
		} else {
			VAR_1 = ((((((x * y) * z) + (x * -(t * a))) + (x * fma(-t, a, (t * a)))) - (b * ((c * z) - (i * a)))) + ((j * fma(t, c, -(i * y))) + (j * fma(-i, y, (i * y)))));
		}
		VAR = VAR_1;
	}
	return VAR;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Bits error versus a

Bits error versus b

Bits error versus c

Bits error versus i

Bits error versus j

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Split input into 3 regimes
  2. if j < -5.101805739841539e-198

    1. Initial program 10.5

      \[\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)\]
    2. Simplified10.5

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

    if -5.101805739841539e-198 < j < 6.584199307173384e-294

    1. Initial program 17.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)\]
    2. Taylor expanded around 0 16.8

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

    if 6.584199307173384e-294 < j

    1. Initial program 11.8

      \[\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)\]
    2. Using strategy rm
    3. Applied prod-diff11.8

      \[\leadsto \left(x \cdot \color{blue}{\left(\mathsf{fma}\left(y, z, -a \cdot t\right) + \mathsf{fma}\left(-a, t, a \cdot t\right)\right)} - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right)\]
    4. Applied distribute-lft-in11.8

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

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

      \[\leadsto \left(\left(x \cdot \mathsf{fma}\left(z, y, -t \cdot a\right) + \color{blue}{x \cdot \mathsf{fma}\left(-t, a, t \cdot a\right)}\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right)\]
    7. Using strategy rm
    8. Applied prod-diff11.8

      \[\leadsto \left(\left(x \cdot \mathsf{fma}\left(z, y, -t \cdot a\right) + x \cdot \mathsf{fma}\left(-t, a, t \cdot a\right)\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \color{blue}{\left(\mathsf{fma}\left(c, t, -y \cdot i\right) + \mathsf{fma}\left(-y, i, y \cdot i\right)\right)}\]
    9. Applied distribute-lft-in11.8

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

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

      \[\leadsto \left(\left(x \cdot \mathsf{fma}\left(z, y, -t \cdot a\right) + x \cdot \mathsf{fma}\left(-t, a, t \cdot a\right)\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + \left(j \cdot \mathsf{fma}\left(t, c, -i \cdot y\right) + \color{blue}{j \cdot \mathsf{fma}\left(-i, y, i \cdot y\right)}\right)\]
    12. Using strategy rm
    13. Applied fma-udef11.8

      \[\leadsto \left(\left(x \cdot \color{blue}{\left(z \cdot y + \left(-t \cdot a\right)\right)} + x \cdot \mathsf{fma}\left(-t, a, t \cdot a\right)\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + \left(j \cdot \mathsf{fma}\left(t, c, -i \cdot y\right) + j \cdot \mathsf{fma}\left(-i, y, i \cdot y\right)\right)\]
    14. Applied distribute-lft-in11.8

      \[\leadsto \left(\left(\color{blue}{\left(x \cdot \left(z \cdot y\right) + x \cdot \left(-t \cdot a\right)\right)} + x \cdot \mathsf{fma}\left(-t, a, t \cdot a\right)\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + \left(j \cdot \mathsf{fma}\left(t, c, -i \cdot y\right) + j \cdot \mathsf{fma}\left(-i, y, i \cdot y\right)\right)\]
    15. Using strategy rm
    16. Applied *-commutative11.8

      \[\leadsto \left(\left(\left(x \cdot \color{blue}{\left(y \cdot z\right)} + x \cdot \left(-t \cdot a\right)\right) + x \cdot \mathsf{fma}\left(-t, a, t \cdot a\right)\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + \left(j \cdot \mathsf{fma}\left(t, c, -i \cdot y\right) + j \cdot \mathsf{fma}\left(-i, y, i \cdot y\right)\right)\]
    17. Applied associate-*r*12.5

      \[\leadsto \left(\left(\left(\color{blue}{\left(x \cdot y\right) \cdot z} + x \cdot \left(-t \cdot a\right)\right) + x \cdot \mathsf{fma}\left(-t, a, t \cdot a\right)\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + \left(j \cdot \mathsf{fma}\left(t, c, -i \cdot y\right) + j \cdot \mathsf{fma}\left(-i, y, i \cdot y\right)\right)\]
  3. Recombined 3 regimes into one program.
  4. Final simplification12.3

    \[\leadsto \begin{array}{l} \mathbf{if}\;j \le -5.1018057398415387 \cdot 10^{-198}:\\ \;\;\;\;\mathsf{fma}\left(c \cdot t - i \cdot y, j, x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right)\\ \mathbf{elif}\;j \le 6.5841993071733845 \cdot 10^{-294}:\\ \;\;\;\;\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot 0\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\left(\left(x \cdot y\right) \cdot z + x \cdot \left(-t \cdot a\right)\right) + x \cdot \mathsf{fma}\left(-t, a, t \cdot a\right)\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + \left(j \cdot \mathsf{fma}\left(t, c, -i \cdot y\right) + j \cdot \mathsf{fma}\left(-i, y, i \cdot y\right)\right)\\ \end{array}\]

Reproduce

herbie shell --seed 2020078 +o rules:numerics
(FPCore (x y z t a b c i j)
  :name "Linear.Matrix:det33 from linear-1.19.1.3"
  :precision binary64
  (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (* j (- (* c t) (* i y)))))