Average Error: 11.3 → 10.1
Time: 1.7m
Precision: 64
Internal Precision: 384
\[\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(y \cdot z\right) + \left(\left(j \cdot \left(c \cdot t - y \cdot i\right) - \left(t \cdot x\right) \cdot a\right) - b \cdot \left(z \cdot c - a \cdot i\right)\right) = -\infty:\\ \;\;\;\;j \cdot \left(t \cdot c - i \cdot y\right) + \left(z \cdot y - a \cdot t\right) \cdot x\\ \mathbf{if}\;x \cdot \left(y \cdot z\right) + \left(\left(j \cdot \left(c \cdot t - y \cdot i\right) - \left(t \cdot x\right) \cdot a\right) - b \cdot \left(z \cdot c - a \cdot i\right)\right) \le +\infty:\\ \;\;\;\;x \cdot \left(y \cdot z\right) + \left(\left(j \cdot \left(c \cdot t - y \cdot i\right) - \left(t \cdot x\right) \cdot a\right) - b \cdot \left(z \cdot c - a \cdot i\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(z \cdot y - a \cdot t\right) \cdot x - \left(z \cdot c - i \cdot a\right) \cdot b\\ \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 (+ (* x (* y z)) (- (- (* j (- (* c t) (* y i))) (* (* t x) a)) (* b (- (* z c) (* a i))))) < -inf.0

    1. Initial program 49.0

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

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

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

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

    1. Initial program 6.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. Using strategy rm
    3. Applied sub-neg6.9

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

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

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

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

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

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

    1. Initial program 61.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 54.7

      \[\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}{0}\]
    3. Applied simplify54.7

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

Runtime

Time bar (total: 1.7m)Debug logProfile

herbie shell --seed '#(1070609872 3456127585 2380521889 2328837196 1765472538 734540918)' 
(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)))))