Average Error: 11.8 → 10.9
Time: 11.3s
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}\;x \le -1.4891416355699024 \cdot 10^{-67} \lor \neg \left(x \le 9.75163448126466317 \cdot 10^{-175}\right):\\ \;\;\;\;\mathsf{fma}\left(c \cdot t - i \cdot y, j, \mathsf{fma}\left(y, z, -t \cdot a\right) \cdot x + \left(\mathsf{fma}\left(-t, a, t \cdot a\right) \cdot x - b \cdot \left(c \cdot z - i \cdot a\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(c \cdot t - i \cdot y, j, \mathsf{fma}\left(a, i \cdot b, -\mathsf{fma}\left(z, b \cdot c, \left(a \cdot x\right) \cdot t\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}\;x \le -1.4891416355699024 \cdot 10^{-67} \lor \neg \left(x \le 9.75163448126466317 \cdot 10^{-175}\right):\\
\;\;\;\;\mathsf{fma}\left(c \cdot t - i \cdot y, j, \mathsf{fma}\left(y, z, -t \cdot a\right) \cdot x + \left(\mathsf{fma}\left(-t, a, t \cdot a\right) \cdot x - b \cdot \left(c \cdot z - i \cdot a\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(c \cdot t - i \cdot y, j, \mathsf{fma}\left(a, i \cdot b, -\mathsf{fma}\left(z, b \cdot c, \left(a \cdot x\right) \cdot t\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 (((x <= -1.4891416355699024e-67) || !(x <= 9.751634481264663e-175))) {
		VAR = fma(((c * t) - (i * y)), j, ((fma(y, z, -(t * a)) * x) + ((fma(-t, a, (t * a)) * x) - (b * ((c * z) - (i * a))))));
	} else {
		VAR = fma(((c * t) - (i * y)), j, fma(a, (i * b), -fma(z, (b * c), ((a * x) * t))));
	}
	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 x < -1.4891416355699024e-67 or 9.751634481264663e-175 < x

    1. Initial program 9.3

      \[\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. Simplified9.2

      \[\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 *-commutative9.2

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

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

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

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

    if -1.4891416355699024e-67 < x < 9.751634481264663e-175

    1. Initial program 16.1

      \[\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. Simplified16.1

      \[\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. Taylor expanded around inf 13.8

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

      \[\leadsto \mathsf{fma}\left(c \cdot t - i \cdot y, j, \color{blue}{\mathsf{fma}\left(a, i \cdot b, -\mathsf{fma}\left(z, b \cdot c, a \cdot \left(x \cdot t\right)\right)\right)}\right)\]
    5. Using strategy rm
    6. Applied associate-*r*13.7

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

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

Reproduce

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