Average Error: 11.2 → 4.1
Time: 2.4m
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))_* = -\infty:\\ \;\;\;\;\left(y \cdot z\right) \cdot x + \left(j \cdot \left(c \cdot t - y \cdot i\right) - (b \cdot \left(z \cdot c - i \cdot a\right) + \left(t \cdot \left(a \cdot x\right)\right))_*\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 3.201320007743836 \cdot 10^{+304}:\\ \;\;\;\;(\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}:\\ \;\;\;\;x \cdot \left(y \cdot z\right) + \left(j \cdot \left(c \cdot t - y \cdot i\right) - (b \cdot \left(z \cdot c - a \cdot i\right) + \left(\left(t \cdot x\right) \cdot a\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)))) < -inf.0

    1. Initial program 21.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-neg21.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-rgt-in21.6

      \[\leadsto \left(\color{blue}{\left(\left(y \cdot z\right) \cdot x + \left(-t \cdot a\right) \cdot x\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+21.6

      \[\leadsto \color{blue}{\left(\left(y \cdot z\right) \cdot x + \left(\left(-t \cdot a\right) \cdot x - 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+21.6

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

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

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

    1. Initial program 8.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 6.5

      \[\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.4

      \[\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.4

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

      \[\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 3.201320007743836e+304 < (+ (fma (- (* y z) (* t a)) x (* (* b c) (- z))) (fma i (- (* a b) (* j y)) (* c (* j t))))

    1. Initial program 25.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-neg25.5

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

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

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

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

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

Runtime

Time bar (total: 2.4m)Debug logProfile

herbie shell --seed '#(1071948828 1180510430 2986424009 997076509 406109801 420189285)' +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)))))