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

    1. Initial program 40.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 inf 33.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 simplify33.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 -inf.0 < (+ (- (fma (- (* z y) (* a t)) x (* (* t j) c)) (* (- (* z c) (* i a)) b)) (* (* j (- i)) y)) < 5.683066074420131e+301

    1. Initial program 4.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. Using strategy rm
    3. Applied sub-neg4.5

      \[\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-in4.5

      \[\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+4.5

      \[\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 simplify2.9

      \[\leadsto \color{blue}{\left((\left(z \cdot y - a \cdot t\right) \cdot x + \left(\left(t \cdot j\right) \cdot c\right))_* - \left(z \cdot c - i \cdot a\right) \cdot b\right)} + j \cdot \left(-i \cdot y\right)\]
    7. Using strategy rm
    8. Applied distribute-lft-neg-in2.9

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

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

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

    1. Initial program 39.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 0 37.9

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

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

Runtime

Time bar (total: 1.9m)Debug logProfile

herbie shell --seed '#(1072330854 3074818769 591214268 3603999196 3863745332 3332387116)' +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)))))