Average Error: 11.7 → 6.8
Time: 2.6m
Precision: 64
Internal Precision: 576
\[\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}\;(\left(y \cdot z - t \cdot a\right) \cdot x + \left(\left(b \cdot c\right) \cdot \left(-z\right)\right))_* + (i \cdot \left(a \cdot b - j \cdot y\right) + \left(c \cdot \left(j \cdot t\right)\right))_* \le -1.300053229493825 \cdot 10^{+306}:\\ \;\;\;\;j \cdot \left(c \cdot t - i \cdot y\right) - b \cdot \left(c \cdot z - a \cdot i\right)\\ \mathbf{if}\;(\left(y \cdot z - t \cdot a\right) \cdot x + \left(\left(b \cdot c\right) \cdot \left(-z\right)\right))_* + (i \cdot \left(a \cdot b - j \cdot y\right) + \left(c \cdot \left(j \cdot t\right)\right))_* \le 4.263228310421585 \cdot 10^{+307}:\\ \;\;\;\;(\left(y \cdot z - t \cdot a\right) \cdot x + \left(\left(b \cdot c\right) \cdot \left(-z\right)\right))_* + (i \cdot \left(a \cdot b - j \cdot y\right) + \left(c \cdot \left(j \cdot t\right)\right))_*\\ \mathbf{else}:\\ \;\;\;\;(\left(x \cdot y - c \cdot b\right) \cdot z + \left(\left(-a\right) \cdot \left(x \cdot t\right)\right))_*\\ \end{array}\]

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

Derivation

  1. Split input into 3 regimes
  2. if (+ (fma (- (* y z) (* t a)) x (* (* b c) (- z))) (fma i (- (* a b) (* j y)) (* c (* j t)))) < -1.300053229493825e+306

    1. Initial program 24.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. Taylor expanded around 0 25.3

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

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

    if -1.300053229493825e+306 < (+ (fma (- (* y z) (* t a)) x (* (* b c) (- z))) (fma i (- (* a b) (* j y)) (* c (* j t)))) < 4.263228310421585e+307

    1. Initial program 8.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. Taylor expanded around inf 6.8

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

      \[\leadsto \color{blue}{(\left(c \cdot t - i \cdot y\right) \cdot j + \left(\left(i \cdot a\right) \cdot b\right))_* + (x \cdot \left(z \cdot y - a \cdot t\right) + \left(\left(c \cdot b\right) \cdot \left(-z\right)\right))_*}\]
    4. Taylor expanded around inf 6.8

      \[\leadsto \color{blue}{\left(\left(j \cdot \left(c \cdot t\right) + b \cdot \left(a \cdot i\right)\right) - j \cdot \left(y \cdot i\right)\right)} + (x \cdot \left(z \cdot y - a \cdot t\right) + \left(\left(c \cdot b\right) \cdot \left(-z\right)\right))_*\]
    5. Applied simplify0.8

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

    if 4.263228310421585e+307 < (+ (fma (- (* y z) (* t a)) x (* (* b c) (- z))) (fma i (- (* a b) (* j y)) (* c (* j t))))

    1. Initial program 26.2

      \[\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 inf 34.9

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

      \[\leadsto \color{blue}{(\left(c \cdot t - i \cdot y\right) \cdot j + \left(\left(i \cdot a\right) \cdot b\right))_* + (x \cdot \left(z \cdot y - a \cdot t\right) + \left(\left(c \cdot b\right) \cdot \left(-z\right)\right))_*}\]
    4. Taylor expanded around inf 39.1

      \[\leadsto \color{blue}{z \cdot \left(y \cdot x\right) - \left(a \cdot \left(t \cdot x\right) + z \cdot \left(b \cdot c\right)\right)}\]
    5. Applied simplify39.1

      \[\leadsto \color{blue}{(\left(x \cdot y - c \cdot b\right) \cdot z + \left(\left(-a\right) \cdot \left(x \cdot t\right)\right))_*}\]
  3. Recombined 3 regimes into one program.

Runtime

Time bar (total: 2.6m)Debug logProfile

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