Average Error: 11.7 → 6.0
Time: 2.8m
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}\;(x \cdot \left(z \cdot y - t \cdot a\right) + \left(c \cdot \left(j \cdot t\right)\right))_* - (\left(c \cdot z - a \cdot i\right) \cdot b + \left(\left(j \cdot y\right) \cdot i\right))_* \le -1.9612421800185972 \cdot 10^{+298}:\\ \;\;\;\;(\left(z \cdot y - t \cdot a\right) \cdot x + \left(\left(t \cdot c - y \cdot i\right) \cdot j - \left(z \cdot \left(b \cdot c\right) - a \cdot \left(i \cdot b\right)\right)\right))_*\\ \mathbf{if}\;(x \cdot \left(z \cdot y - t \cdot a\right) + \left(c \cdot \left(j \cdot t\right)\right))_* - (\left(c \cdot z - a \cdot i\right) \cdot b + \left(\left(j \cdot y\right) \cdot i\right))_* \le 7.055696161566341 \cdot 10^{+305}:\\ \;\;\;\;(x \cdot \left(z \cdot y - t \cdot a\right) + \left(c \cdot \left(j \cdot t\right)\right))_* - (\left(c \cdot z - a \cdot i\right) \cdot b + \left(\left(j \cdot y\right) \cdot i\right))_*\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(z \cdot x\right) + \left(j \cdot \left(c \cdot t - i \cdot y\right) - (b \cdot \left(c \cdot z - i \cdot a\right) + \left(\left(a \cdot x\right) \cdot t\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 x (- (* z y) (* t a)) (* c (* j t))) (fma (- (* c z) (* a i)) b (* (* j y) i))) < -1.9612421800185972e+298

    1. Initial program 35.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. Applied simplify35.7

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

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

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

    1. Initial program 4.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. Applied simplify4.4

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

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

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

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

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

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

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

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

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

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

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

Runtime

Time bar (total: 2.8m)Debug logProfile

herbie shell --seed 2019053 +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)))))