Average Error: 11.3 → 7.4
Time: 1.1m
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}\;\frac{\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) \cdot \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) - \left(j \cdot \left(c \cdot t - i \cdot y\right)\right) \cdot \left(j \cdot \left(c \cdot t - i \cdot y\right)\right)}{\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)} \le +\infty:\\ \;\;\;\;\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + \left(\left(j \cdot c\right) \cdot t + j \cdot \left(-i \cdot y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(b \cdot i - x \cdot t\right) \cdot a + c \cdot \left(j \cdot t - z \cdot b\right)\right) + \left(j \cdot i\right) \cdot \left(-y\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 2 regimes
  2. if (/ (- (* (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a))))) (* (* j (- (* c t) (* i y))) (* j (- (* c t) (* i y))))) (- (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (* j (- (* c t) (* i y))))) < +inf.0

    1. Initial program 0.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-neg0.6

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

      \[\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. Using strategy rm
    6. Applied associate-*r*2.5

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

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

    1. Initial program 42.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-neg42.7

      \[\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-in42.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}{\left(j \cdot \left(c \cdot t\right) + j \cdot \left(-i \cdot y\right)\right)}\]
    5. Taylor expanded around inf 35.9

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

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

Runtime

Time bar (total: 1.1m)Debug logProfile

herbie shell --seed '#(1070258749 1877548225 2229079127 1588002776 3179087814 1886870650)' 
(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)))))