Average Error: 12.8 → 11.7
Time: 10.3s
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}\;c \le -5.76503228582785245 \cdot 10^{204}:\\ \;\;\;\;x \cdot \left(y \cdot z - t \cdot a\right) + \left(c \cdot \left(t \cdot j\right) + i \cdot \left(y \cdot \left(-j\right)\right)\right)\\ \mathbf{elif}\;c \le -3.0440038809282484 \cdot 10^{-105}:\\ \;\;\;\;\left(\left(\left(\sqrt[3]{z} \cdot \sqrt[3]{z}\right) \cdot \left(y \cdot \left(x \cdot \sqrt[3]{z}\right)\right) + a \cdot \left(x \cdot \left(-t\right)\right)\right) - b \cdot \left(c \cdot z - a \cdot i\right)\right) + j \cdot \left(c \cdot t - y \cdot i\right)\\ \mathbf{elif}\;c \le -2.86672419427387981 \cdot 10^{-241}:\\ \;\;\;\;\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - a \cdot i\right)\right) + \left(i \cdot \left(y \cdot \left(-j\right)\right) + t \cdot \left(c \cdot j\right)\right)\\ \mathbf{elif}\;c \le 5.32068816882658979 \cdot 10^{-52}:\\ \;\;\;\;\left(\left(\left(\sqrt[3]{z} \cdot \sqrt[3]{z}\right) \cdot \left(y \cdot \left(x \cdot \sqrt[3]{z}\right)\right) + a \cdot \left(x \cdot \left(-t\right)\right)\right) - b \cdot \left(c \cdot z - a \cdot i\right)\right) + j \cdot \left(c \cdot t - y \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - a \cdot i\right)\right) + \left(c \cdot \left(t \cdot j\right) + y \cdot \left(j \cdot \left(-i\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

Original12.8
Target16.6
Herbie11.7
\[\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 4 regimes
  2. if c < -5.76503228582785245e204

    1. Initial program 27.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. Using strategy rm
    3. Applied sub-neg27.0

      \[\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-in27.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) + j \cdot \left(-i \cdot y\right)\right)}\]
    5. Simplified18.3

      \[\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}{c \cdot \left(j \cdot t\right)} + j \cdot \left(-i \cdot y\right)\right)\]
    6. Simplified17.2

      \[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(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)\]
    7. Taylor expanded around 0 27.2

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

    if -5.76503228582785245e204 < c < -3.0440038809282484e-105 or -2.86672419427387981e-241 < c < 5.32068816882658979e-52

    1. Initial program 10.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-neg10.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-in10.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. Simplified10.9

      \[\leadsto \left(\left(\color{blue}{z \cdot \left(y \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. Simplified10.8

      \[\leadsto \left(\left(z \cdot \left(y \cdot x\right) + \color{blue}{a \cdot \left(t \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)\]
    7. Using strategy rm
    8. Applied add-cube-cbrt10.9

      \[\leadsto \left(\left(\color{blue}{\left(\left(\sqrt[3]{z} \cdot \sqrt[3]{z}\right) \cdot \sqrt[3]{z}\right)} \cdot \left(y \cdot x\right) + a \cdot \left(t \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)\]
    9. Applied associate-*l*10.9

      \[\leadsto \left(\left(\color{blue}{\left(\sqrt[3]{z} \cdot \sqrt[3]{z}\right) \cdot \left(\sqrt[3]{z} \cdot \left(y \cdot x\right)\right)} + a \cdot \left(t \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)\]
    10. Simplified10.5

      \[\leadsto \left(\left(\left(\sqrt[3]{z} \cdot \sqrt[3]{z}\right) \cdot \color{blue}{\left(y \cdot \left(x \cdot \sqrt[3]{z}\right)\right)} + a \cdot \left(t \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 -3.0440038809282484e-105 < c < -2.86672419427387981e-241

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

      \[\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-in9.8

      \[\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. Simplified13.0

      \[\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}{c \cdot \left(j \cdot t\right)} + j \cdot \left(-i \cdot y\right)\right)\]
    6. Simplified13.0

      \[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(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)\]
    7. Using strategy rm
    8. Applied associate-*r*10.4

      \[\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(c \cdot j\right) \cdot t} + i \cdot \left(j \cdot \left(-y\right)\right)\right)\]

    if 5.32068816882658979e-52 < c

    1. Initial program 15.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-neg15.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-in15.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. Simplified12.4

      \[\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}{c \cdot \left(j \cdot t\right)} + j \cdot \left(-i \cdot y\right)\right)\]
    6. Simplified12.0

      \[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(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)\]
    7. Using strategy rm
    8. Applied associate-*r*12.0

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \le -5.76503228582785245 \cdot 10^{204}:\\ \;\;\;\;x \cdot \left(y \cdot z - t \cdot a\right) + \left(c \cdot \left(t \cdot j\right) + i \cdot \left(y \cdot \left(-j\right)\right)\right)\\ \mathbf{elif}\;c \le -3.0440038809282484 \cdot 10^{-105}:\\ \;\;\;\;\left(\left(\left(\sqrt[3]{z} \cdot \sqrt[3]{z}\right) \cdot \left(y \cdot \left(x \cdot \sqrt[3]{z}\right)\right) + a \cdot \left(x \cdot \left(-t\right)\right)\right) - b \cdot \left(c \cdot z - a \cdot i\right)\right) + j \cdot \left(c \cdot t - y \cdot i\right)\\ \mathbf{elif}\;c \le -2.86672419427387981 \cdot 10^{-241}:\\ \;\;\;\;\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - a \cdot i\right)\right) + \left(i \cdot \left(y \cdot \left(-j\right)\right) + t \cdot \left(c \cdot j\right)\right)\\ \mathbf{elif}\;c \le 5.32068816882658979 \cdot 10^{-52}:\\ \;\;\;\;\left(\left(\left(\sqrt[3]{z} \cdot \sqrt[3]{z}\right) \cdot \left(y \cdot \left(x \cdot \sqrt[3]{z}\right)\right) + a \cdot \left(x \cdot \left(-t\right)\right)\right) - b \cdot \left(c \cdot z - a \cdot i\right)\right) + j \cdot \left(c \cdot t - y \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - a \cdot i\right)\right) + \left(c \cdot \left(t \cdot j\right) + y \cdot \left(j \cdot \left(-i\right)\right)\right)\\ \end{array}\]

Reproduce

herbie shell --seed 2020182 
(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)))))