Average Error: 11.8 → 3.2
Time: 2.3m
Precision: 64
Internal Precision: 320
\[\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 \cdot \left(c \cdot t - y \cdot i\right) + \left(y \cdot \left(z \cdot x\right)\right))_* - (\left(c \cdot z - i \cdot a\right) \cdot b + \left(\left(a \cdot x\right) \cdot t\right))_* \le -1.2938856282681744 \cdot 10^{+307}:\\ \;\;\;\;(x \cdot \left(y \cdot z - t \cdot a\right) + \left(\left(-c\right) \cdot \left(z \cdot b\right)\right))_* + (i \cdot \left(b \cdot a - j \cdot y\right) + \left(\left(j \cdot c\right) \cdot t\right))_*\\ \mathbf{if}\;(j \cdot \left(c \cdot t - y \cdot i\right) + \left(y \cdot \left(z \cdot x\right)\right))_* - (\left(c \cdot z - i \cdot a\right) \cdot b + \left(\left(a \cdot x\right) \cdot t\right))_* \le 3.261760181174107 \cdot 10^{+304}:\\ \;\;\;\;(j \cdot \left(c \cdot t - y \cdot i\right) + \left(y \cdot \left(z \cdot x\right)\right))_* - (\left(c \cdot z - i \cdot a\right) \cdot b + \left(\left(a \cdot x\right) \cdot t\right))_*\\ \mathbf{else}:\\ \;\;\;\;(x \cdot \left(y \cdot z - t \cdot a\right) + \left(\left(-c\right) \cdot \left(z \cdot b\right)\right))_* + (i \cdot \left(b \cdot a - j \cdot y\right) + \left(\left(j \cdot c\right) \cdot t\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 2 regimes
  2. if (- (fma j (- (* c t) (* y i)) (* y (* z x))) (fma (- (* c z) (* i a)) b (* (* a x) t))) < -1.2938856282681744e+307 or 3.261760181174107e+304 < (- (fma j (- (* c t) (* y i)) (* y (* z x))) (fma (- (* c z) (* i a)) b (* (* a x) t)))

    1. Initial program 41.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 25.4

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

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

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

      \[\leadsto \color{blue}{(x \cdot \left(y \cdot z - t \cdot a\right) + \left(\left(-c\right) \cdot \left(z \cdot b\right)\right))_* + (i \cdot \left(b \cdot a - j \cdot y\right) + \left(j \cdot \left(c \cdot t\right)\right))_*}\]
    6. Using strategy rm
    7. Applied associate-*r*12.8

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

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

    1. Initial program 4.6

      \[\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 4.8

      \[\leadsto \left(\color{blue}{\left(x \cdot \left(z \cdot y\right) - a \cdot \left(x \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)\]
    3. Applied simplify0.9

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

Runtime

Time bar (total: 2.3m)Debug logProfile

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