Average Error: 11.9 → 10.6
Time: 9.9s
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}\;b \le -2.99501739976379836 \cdot 10^{112} \lor \neg \left(b \le 1.9226580672600697 \cdot 10^{94}\right):\\ \;\;\;\;\mathsf{fma}\left(c \cdot t - i \cdot y, j, x \cdot \left(y \cdot z - t \cdot a\right) - \left(b \cdot \left(c \cdot z\right) + b \cdot \left(-i \cdot a\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(c \cdot t - i \cdot y, j, x \cdot \left(y \cdot z - t \cdot a\right) - \left(b \cdot \left(c \cdot z\right) + \left(-a \cdot \left(i \cdot b\right)\right)\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}\;b \le -2.99501739976379836 \cdot 10^{112} \lor \neg \left(b \le 1.9226580672600697 \cdot 10^{94}\right):\\
\;\;\;\;\mathsf{fma}\left(c \cdot t - i \cdot y, j, x \cdot \left(y \cdot z - t \cdot a\right) - \left(b \cdot \left(c \cdot z\right) + b \cdot \left(-i \cdot a\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(c \cdot t - i \cdot y, j, x \cdot \left(y \cdot z - t \cdot a\right) - \left(b \cdot \left(c \cdot z\right) + \left(-a \cdot \left(i \cdot b\right)\right)\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 (((b <= -2.9950173997637984e+112) || !(b <= 1.9226580672600697e+94))) {
		VAR = fma(((c * t) - (i * y)), j, ((x * ((y * z) - (t * a))) - ((b * (c * z)) + (b * -(i * a)))));
	} else {
		VAR = fma(((c * t) - (i * y)), j, ((x * ((y * z) - (t * a))) - ((b * (c * z)) + -(a * (i * b)))));
	}
	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 2 regimes
  2. if b < -2.9950173997637984e+112 or 1.9226580672600697e+94 < b

    1. Initial program 6.7

      \[\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. Simplified6.7

      \[\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)}\]
    3. Using strategy rm
    4. Applied sub-neg6.7

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

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

    if -2.9950173997637984e+112 < b < 1.9226580672600697e+94

    1. Initial program 13.4

      \[\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. Simplified13.4

      \[\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)}\]
    3. Using strategy rm
    4. Applied sub-neg13.4

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

      \[\leadsto \mathsf{fma}\left(c \cdot t - i \cdot y, j, x \cdot \left(y \cdot z - t \cdot a\right) - \color{blue}{\left(b \cdot \left(c \cdot z\right) + b \cdot \left(-i \cdot a\right)\right)}\right)\]
    6. Using strategy rm
    7. Applied distribute-rgt-neg-out13.4

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \le -2.99501739976379836 \cdot 10^{112} \lor \neg \left(b \le 1.9226580672600697 \cdot 10^{94}\right):\\ \;\;\;\;\mathsf{fma}\left(c \cdot t - i \cdot y, j, x \cdot \left(y \cdot z - t \cdot a\right) - \left(b \cdot \left(c \cdot z\right) + b \cdot \left(-i \cdot a\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(c \cdot t - i \cdot y, j, x \cdot \left(y \cdot z - t \cdot a\right) - \left(b \cdot \left(c \cdot z\right) + \left(-a \cdot \left(i \cdot b\right)\right)\right)\right)\\ \end{array}\]

Reproduce

herbie shell --seed 2020106 +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)))))