Average Error: 11.9 → 11.2
Time: 30.2s
Precision: binary64
\[\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}\;i \le -6.0062128104015008 \cdot 10^{49}:\\ \;\;\;\;\left(x \cdot \left(y \cdot z - t \cdot a\right) - \left(\sqrt[3]{b \cdot \left(z \cdot c - i \cdot a\right)} \cdot \sqrt[3]{b \cdot \left(z \cdot c - i \cdot a\right)}\right) \cdot \left(\sqrt[3]{b} \cdot \sqrt[3]{z \cdot c - i \cdot a}\right)\right) + \left(t \cdot \left(c \cdot j\right) + i \cdot \left(y \cdot \left(-j\right)\right)\right)\\ \mathbf{elif}\;i \le -7.6076422673180812 \cdot 10^{-134}:\\ \;\;\;\;\left(\left(y \cdot \left(x \cdot z\right) + t \cdot \left(x \cdot \left(-a\right)\right)\right) - b \cdot \left(z \cdot c - i \cdot a\right)\right) + j \cdot \left(t \cdot c - i \cdot y\right)\\ \mathbf{elif}\;i \le -1.22534612469010892 \cdot 10^{-306}:\\ \;\;\;\;j \cdot \left(t \cdot c - i \cdot y\right) + \left(x \cdot \left(y \cdot z - t \cdot a\right) - \left(c \cdot \left(z \cdot b\right) + i \cdot \left(a \cdot \left(-b\right)\right)\right)\right)\\ \mathbf{elif}\;i \le 1.2366775012385029 \cdot 10^{-10}:\\ \;\;\;\;\left(\left(y \cdot \left(x \cdot z\right) + t \cdot \left(x \cdot \left(-a\right)\right)\right) - b \cdot \left(z \cdot c - i \cdot a\right)\right) + j \cdot \left(t \cdot c - i \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot \left(y \cdot z - t \cdot a\right) - \left(\sqrt[3]{b \cdot \left(z \cdot c - i \cdot a\right)} \cdot \sqrt[3]{b \cdot \left(z \cdot c - i \cdot a\right)}\right) \cdot \left(\sqrt[3]{b} \cdot \sqrt[3]{z \cdot c - i \cdot a}\right)\right) + \left(t \cdot \left(c \cdot j\right) + i \cdot \left(y \cdot \left(-j\right)\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

Target

Original11.9
Target15.7
Herbie11.2
\[\begin{array}{l} \mathbf{if}\;t \lt -8.1209789191959122 \cdot 10^{-33}:\\ \;\;\;\;x \cdot \left(z \cdot y - a \cdot t\right) - \left(b \cdot \left(z \cdot c - a \cdot i\right) - \left(c \cdot t - y \cdot i\right) \cdot j\right)\\ \mathbf{elif}\;t \lt -4.7125538182184851 \cdot 10^{-169}:\\ \;\;\;\;\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + \frac{j \cdot \left({\left(c \cdot t\right)}^{2} - {\left(i \cdot y\right)}^{2}\right)}{c \cdot t + i \cdot y}\\ \mathbf{elif}\;t \lt -7.63353334603158369 \cdot 10^{-308}:\\ \;\;\;\;x \cdot \left(z \cdot y - a \cdot t\right) - \left(b \cdot \left(z \cdot c - a \cdot i\right) - \left(c \cdot t - y \cdot i\right) \cdot j\right)\\ \mathbf{elif}\;t \lt 1.0535888557455487 \cdot 10^{-139}:\\ \;\;\;\;\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + \frac{j \cdot \left({\left(c \cdot t\right)}^{2} - {\left(i \cdot y\right)}^{2}\right)}{c \cdot t + i \cdot y}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(z \cdot y - a \cdot t\right) - \left(b \cdot \left(z \cdot c - a \cdot i\right) - \left(c \cdot t - y \cdot i\right) \cdot j\right)\\ \end{array}\]

Derivation

  1. Split input into 3 regimes
  2. if i < -6.0062128104015008e49 or 1.2366775012385029e-10 < i

    1. Initial program 17.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 add-cube-cbrt17.7

      \[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\right) - \color{blue}{\left(\sqrt[3]{b \cdot \left(c \cdot z - i \cdot a\right)} \cdot \sqrt[3]{b \cdot \left(c \cdot z - i \cdot a\right)}\right) \cdot \sqrt[3]{b \cdot \left(c \cdot z - i \cdot a\right)}}\right) + j \cdot \left(c \cdot t - i \cdot y\right)\]
    4. Using strategy rm
    5. Applied cbrt-prod17.7

      \[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\right) - \left(\sqrt[3]{b \cdot \left(c \cdot z - i \cdot a\right)} \cdot \sqrt[3]{b \cdot \left(c \cdot z - i \cdot a\right)}\right) \cdot \color{blue}{\left(\sqrt[3]{b} \cdot \sqrt[3]{c \cdot z - i \cdot a}\right)}\right) + j \cdot \left(c \cdot t - i \cdot y\right)\]
    6. Using strategy rm
    7. Applied sub-neg17.7

      \[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\right) - \left(\sqrt[3]{b \cdot \left(c \cdot z - i \cdot a\right)} \cdot \sqrt[3]{b \cdot \left(c \cdot z - i \cdot a\right)}\right) \cdot \left(\sqrt[3]{b} \cdot \sqrt[3]{c \cdot z - i \cdot a}\right)\right) + j \cdot \color{blue}{\left(c \cdot t + \left(-i \cdot y\right)\right)}\]
    8. Applied distribute-lft-in17.7

      \[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\right) - \left(\sqrt[3]{b \cdot \left(c \cdot z - i \cdot a\right)} \cdot \sqrt[3]{b \cdot \left(c \cdot z - i \cdot a\right)}\right) \cdot \left(\sqrt[3]{b} \cdot \sqrt[3]{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)}\]
    9. Simplified17.7

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

      \[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\right) - \left(\sqrt[3]{b \cdot \left(c \cdot z - i \cdot a\right)} \cdot \sqrt[3]{b \cdot \left(c \cdot z - i \cdot a\right)}\right) \cdot \left(\sqrt[3]{b} \cdot \sqrt[3]{c \cdot z - i \cdot a}\right)\right) + \left(c \cdot \left(j \cdot t\right) + \color{blue}{i \cdot \left(j \cdot \left(-y\right)\right)}\right)\]
    11. Using strategy rm
    12. Applied associate-*r*12.7

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

    if -6.0062128104015008e49 < i < -7.6076422673180812e-134 or -1.22534612469010892e-306 < i < 1.2366775012385029e-10

    1. Initial program 8.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-neg8.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-in8.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. Simplified8.6

      \[\leadsto \left(\left(\color{blue}{y \cdot \left(z \cdot x\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)\]
    6. Simplified9.0

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

    if -7.6076422673180812e-134 < i < -1.22534612469010892e-306

    1. Initial program 8.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-neg8.9

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;i \le -6.0062128104015008 \cdot 10^{49}:\\ \;\;\;\;\left(x \cdot \left(y \cdot z - t \cdot a\right) - \left(\sqrt[3]{b \cdot \left(z \cdot c - i \cdot a\right)} \cdot \sqrt[3]{b \cdot \left(z \cdot c - i \cdot a\right)}\right) \cdot \left(\sqrt[3]{b} \cdot \sqrt[3]{z \cdot c - i \cdot a}\right)\right) + \left(t \cdot \left(c \cdot j\right) + i \cdot \left(y \cdot \left(-j\right)\right)\right)\\ \mathbf{elif}\;i \le -7.6076422673180812 \cdot 10^{-134}:\\ \;\;\;\;\left(\left(y \cdot \left(x \cdot z\right) + t \cdot \left(x \cdot \left(-a\right)\right)\right) - b \cdot \left(z \cdot c - i \cdot a\right)\right) + j \cdot \left(t \cdot c - i \cdot y\right)\\ \mathbf{elif}\;i \le -1.22534612469010892 \cdot 10^{-306}:\\ \;\;\;\;j \cdot \left(t \cdot c - i \cdot y\right) + \left(x \cdot \left(y \cdot z - t \cdot a\right) - \left(c \cdot \left(z \cdot b\right) + i \cdot \left(a \cdot \left(-b\right)\right)\right)\right)\\ \mathbf{elif}\;i \le 1.2366775012385029 \cdot 10^{-10}:\\ \;\;\;\;\left(\left(y \cdot \left(x \cdot z\right) + t \cdot \left(x \cdot \left(-a\right)\right)\right) - b \cdot \left(z \cdot c - i \cdot a\right)\right) + j \cdot \left(t \cdot c - i \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot \left(y \cdot z - t \cdot a\right) - \left(\sqrt[3]{b \cdot \left(z \cdot c - i \cdot a\right)} \cdot \sqrt[3]{b \cdot \left(z \cdot c - i \cdot a\right)}\right) \cdot \left(\sqrt[3]{b} \cdot \sqrt[3]{z \cdot c - i \cdot a}\right)\right) + \left(t \cdot \left(c \cdot j\right) + i \cdot \left(y \cdot \left(-j\right)\right)\right)\\ \end{array}\]

Reproduce

herbie shell --seed 2020181 
(FPCore (x y z t a b c i j)
  :name "Linear.Matrix:det33 from linear-1.19.1.3"
  :precision binary64

  :herbie-target
  (if (< t -8.120978919195912e-33) (- (* x (- (* z y) (* a t))) (- (* b (- (* z c) (* a i))) (* (- (* c t) (* y i)) j))) (if (< t -4.712553818218485e-169) (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (/ (* j (- (pow (* c t) 2.0) (pow (* i y) 2.0))) (+ (* c t) (* i y)))) (if (< t -7.633533346031584e-308) (- (* x (- (* z y) (* a t))) (- (* b (- (* z c) (* a i))) (* (- (* c t) (* y i)) j))) (if (< t 1.0535888557455487e-139) (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (/ (* j (- (pow (* c t) 2.0) (pow (* i y) 2.0))) (+ (* c t) (* i y)))) (- (* x (- (* z y) (* a t))) (- (* b (- (* z c) (* a i))) (* (- (* c t) (* y i)) j)))))))

  (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (* j (- (* c t) (* i y)))))