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

    1. Initial program 49.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. Using strategy rm
    3. Applied sub-neg49.2

      \[\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}{\left(c \cdot t + \left(-i \cdot y\right)\right)}\]
    4. Applied distribute-lft-in49.2

      \[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + \color{blue}{\left(j \cdot \left(c \cdot t\right) + j \cdot \left(-i \cdot y\right)\right)}\]
    5. Applied associate-+r+49.2

      \[\leadsto \color{blue}{\left(\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\right)\right) + j \cdot \left(-i \cdot y\right)}\]
    6. Applied simplify43.2

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

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

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

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

    1. Initial program 2.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. Using strategy rm
    3. Applied sub-neg2.6

      \[\leadsto \left(x \cdot \color{blue}{\left(y \cdot z + \left(-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)\]
    4. Applied distribute-lft-in2.6

      \[\leadsto \left(\color{blue}{\left(x \cdot \left(y \cdot z\right) + x \cdot \left(-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)\]
    5. Applied associate--l+2.6

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

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

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

Runtime

Time bar (total: 2.5m)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)))))