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

    1. Initial program 23.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 33.5

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

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

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

    1. Initial program 8.4

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

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

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

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

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

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

    1. Initial program 24.9

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

      \[\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 simplify18.3

      \[\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))_*}\]
  3. Recombined 3 regimes into one program.

Runtime

Time bar (total: 1.7m)Debug logProfile

herbie shell --seed '#(1071852389 864846987 1238109217 3425890003 4124793586 650694553)' +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)))))