Average Error: 11.9 → 3.0
Time: 3.0m
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(y \cdot z\right) + \left(j \cdot \left(c \cdot t - y \cdot i\right) - (b \cdot \left(z \cdot c - a \cdot i\right) + \left(\left(t \cdot x\right) \cdot a\right))_*\right) = -\infty:\\ \;\;\;\;(i \cdot \left(b \cdot a - j \cdot y\right) + \left(\left(z \cdot x\right) \cdot y\right))_* + (c \cdot \left(j \cdot t - b \cdot z\right) + \left(\left(-t\right) \cdot \left(x \cdot a\right)\right))_*\\ \mathbf{if}\;x \cdot \left(y \cdot z\right) + \left(j \cdot \left(c \cdot t - y \cdot i\right) - (b \cdot \left(z \cdot c - a \cdot i\right) + \left(\left(t \cdot x\right) \cdot a\right))_*\right) \le 1.2469135669604342 \cdot 10^{+299}:\\ \;\;\;\;x \cdot \left(y \cdot z\right) + \left(j \cdot \left(c \cdot t - y \cdot i\right) - (b \cdot \left(z \cdot c - a \cdot i\right) + \left(\left(t \cdot x\right) \cdot a\right))_*\right)\\ \mathbf{else}:\\ \;\;\;\;(i \cdot \left(b \cdot a - j \cdot y\right) + \left(\left(z \cdot x\right) \cdot y\right))_* + (c \cdot \left(j \cdot t - b \cdot z\right) + \left(\left(-t\right) \cdot \left(x \cdot a\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 2 regimes
  2. if (+ (* x (* y z)) (- (* j (- (* c t) (* y i))) (fma b (- (* z c) (* a i)) (* (* t x) a)))) < -inf.0 or 1.2469135669604342e+299 < (+ (* x (* y z)) (- (* j (- (* c t) (* y i))) (fma b (- (* z c) (* a i)) (* (* t x) a))))

    1. Initial program 48.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. Taylor expanded around inf 42.0

      \[\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) - y \cdot \left(j \cdot i\right)\right)}\]
    3. Applied simplify42.0

      \[\leadsto \color{blue}{(\left(z \cdot y - a \cdot t\right) \cdot x + \left(\left(j \cdot c\right) \cdot t\right))_* - (\left(z \cdot c - i \cdot a\right) \cdot b + \left(\left(i \cdot y\right) \cdot j\right))_*}\]
    4. Using strategy rm
    5. Applied add-sqr-sqrt51.5

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

      \[\leadsto \color{blue}{1 \cdot (\left(z \cdot y - a \cdot t\right) \cdot x + \left(\left(j \cdot c\right) \cdot t\right))_*} - \sqrt{(\left(z \cdot c - i \cdot a\right) \cdot b + \left(\left(i \cdot y\right) \cdot j\right))_*} \cdot \sqrt{(\left(z \cdot c - i \cdot a\right) \cdot b + \left(\left(i \cdot y\right) \cdot j\right))_*}\]
    7. Applied prod-diff52.2

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

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

      \[\leadsto \left((x \cdot \left(y \cdot z - t \cdot a\right) + \left(c \cdot \left(j \cdot t\right)\right))_* - (b \cdot \left(c \cdot z - i \cdot a\right) + \left(\left(i \cdot j\right) \cdot y\right))_*\right) + \color{blue}{0}\]
    10. Using strategy rm
    11. Applied fma-udef35.4

      \[\leadsto \left(\color{blue}{\left(x \cdot \left(y \cdot z - t \cdot a\right) + c \cdot \left(j \cdot t\right)\right)} - (b \cdot \left(c \cdot z - i \cdot a\right) + \left(\left(i \cdot j\right) \cdot y\right))_*\right) + 0\]
    12. Applied associate--l+35.4

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

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

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

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

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

    1. Initial program 2.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. Using strategy rm
    3. Applied sub-neg2.4

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

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

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

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

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

Runtime

Time bar (total: 3.0m)Debug logProfile

herbie shell --seed '#(1072840222 1305617769 1692503039 1353360431 4178980589 1488672652)' +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)))))