Average Error: 11.6 → 8.8
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}\;y \cdot \left(z \cdot x\right) + \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) = -\infty:\\ \;\;\;\;\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{if}\;y \cdot \left(z \cdot x\right) + \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) \le +\infty:\\ \;\;\;\;y \cdot \left(z \cdot x\right) + \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{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 (+ (* y (* z x)) (- (* j (- (* c t) (* y i))) (fma b (- (* z c) (* i a)) (* t (* a x))))) < -inf.0

    1. Initial program 41.1

      \[\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-neg41.1

      \[\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-in41.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) + j \cdot \left(-i \cdot y\right)\right)}\]
    5. Applied associate-+r+41.1

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

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

      \[\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*24.3

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

    1. Initial program 7.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. Using strategy rm
    3. Applied sub-neg7.8

      \[\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-in7.8

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

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

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

      \[\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)}\]
    8. Using strategy rm
    9. Applied associate-*l*6.6

      \[\leadsto \color{blue}{y \cdot \left(z \cdot x\right)} + \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 < (+ (* y (* z x)) (- (* j (- (* c t) (* y i))) (fma b (- (* z c) (* i a)) (* t (* a x)))))

    1. Initial program 53.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 41.4

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

Runtime

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