Average Error: 11.5 → 6.5
Time: 2.1m
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(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))_* = -\infty:\\ \;\;\;\;(i \cdot \left(a \cdot b - j \cdot y\right) + \left(\left(j \cdot t\right) \cdot c\right))_*\\ \mathbf{if}\;(\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))_* \le 5.906950672975724 \cdot 10^{+305}:\\ \;\;\;\;(\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))_*\\ \mathbf{else}:\\ \;\;\;\;(t \cdot \left(c \cdot j - x \cdot a\right) + \left(x \cdot \left(y \cdot z\right)\right))_* - (b \cdot \left(z \cdot c - a \cdot i\right) + \left(\left(j \cdot y\right) \cdot i\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 (- (* c t) (* i y)) j (* (* i a) b)) (fma x (- (* z y) (* a t)) (* (* c b) (- z)))) < -inf.0

    1. Initial program 49.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 52.8

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

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

    if -inf.0 < (+ (fma (- (* c t) (* i y)) j (* (* i a) b)) (fma x (- (* z y) (* a t)) (* (* c b) (- z)))) < 5.906950672975724e+305

    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. Taylor expanded around inf 0.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 simplify0.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))_*}\]

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

    1. Initial program 49.8

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

      \[\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) - y \cdot \left(j \cdot i\right)\right)}\]
    3. Applied simplify44.2

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

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

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

Runtime

Time bar (total: 2.1m)Debug logProfile

herbie shell --seed '#(1071725047 233389029 2036512464 3988615230 2972226563 1111574017)' +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)))))