Average Error: 12.1 → 11.9
Time: 28.9s
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}\;x \le -3.2724221881762381 \cdot 10^{24}:\\ \;\;\;\;\left(x \cdot \left(y \cdot z - t \cdot a\right) - \left(c \cdot \left(z \cdot b\right) + \sqrt[3]{i \cdot \left(a \cdot \left(-b\right)\right)} \cdot \left(\sqrt[3]{i \cdot \left(a \cdot \left(-b\right)\right)} \cdot \sqrt[3]{i \cdot \left(a \cdot \left(-b\right)\right)}\right)\right)\right) + j \cdot \left(t \cdot c - y \cdot i\right)\\ \mathbf{elif}\;x \le -1.09827367754077949 \cdot 10^{-130}:\\ \;\;\;\;j \cdot \left(t \cdot c - y \cdot i\right) + \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 - a \cdot i\right)\right)\\ \mathbf{elif}\;x \le -6.61603541794831684 \cdot 10^{-230}:\\ \;\;\;\;j \cdot \left(t \cdot c - y \cdot i\right) + \left(x \cdot \left(y \cdot z - t \cdot a\right) - \left(\left(\sqrt[3]{c} \cdot \sqrt[3]{c}\right) \cdot \left(z \cdot \left(b \cdot \sqrt[3]{c}\right)\right) + a \cdot \left(b \cdot \left(-i\right)\right)\right)\right)\\ \mathbf{elif}\;x \le 13889868.629110064:\\ \;\;\;\;j \cdot \left(t \cdot c - y \cdot i\right) + \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 - a \cdot i\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(y \cdot z - t \cdot a\right) - \left(c \cdot \left(z \cdot b\right) + a \cdot \left(b \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.1
Target15.8
Herbie11.9
\[\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 x < -3.2724221881762381e24

    1. Initial program 7.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-neg7.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-in7.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. Simplified7.9

      \[\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. Simplified7.5

      \[\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)\]
    7. Using strategy rm
    8. Applied add-cube-cbrt7.6

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

    if -3.2724221881762381e24 < x < -1.09827367754077949e-130 or -6.61603541794831684e-230 < x < 13889868.629110064

    1. Initial program 14.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-neg14.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-in14.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. Simplified12.1

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

      \[\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 -1.09827367754077949e-130 < x < -6.61603541794831684e-230

    1. Initial program 16.2

      \[\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-neg16.2

      \[\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-in16.2

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

      \[\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. Simplified16.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)\]
    7. Using strategy rm
    8. Applied associate-*r*15.9

      \[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\right) - \left(c \cdot \left(b \cdot z\right) + \color{blue}{\left(i \cdot b\right) \cdot \left(-a\right)}\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right)\]
    9. Using strategy rm
    10. Applied add-cube-cbrt16.1

      \[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\right) - \left(\color{blue}{\left(\left(\sqrt[3]{c} \cdot \sqrt[3]{c}\right) \cdot \sqrt[3]{c}\right)} \cdot \left(b \cdot z\right) + \left(i \cdot b\right) \cdot \left(-a\right)\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right)\]
    11. Applied associate-*l*16.1

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

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

    if 13889868.629110064 < x

    1. Initial program 7.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-neg7.4

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

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

      \[\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. Simplified8.2

      \[\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)\]
    7. Using strategy rm
    8. Applied associate-*r*8.5

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \le -3.2724221881762381 \cdot 10^{24}:\\ \;\;\;\;\left(x \cdot \left(y \cdot z - t \cdot a\right) - \left(c \cdot \left(z \cdot b\right) + \sqrt[3]{i \cdot \left(a \cdot \left(-b\right)\right)} \cdot \left(\sqrt[3]{i \cdot \left(a \cdot \left(-b\right)\right)} \cdot \sqrt[3]{i \cdot \left(a \cdot \left(-b\right)\right)}\right)\right)\right) + j \cdot \left(t \cdot c - y \cdot i\right)\\ \mathbf{elif}\;x \le -1.09827367754077949 \cdot 10^{-130}:\\ \;\;\;\;j \cdot \left(t \cdot c - y \cdot i\right) + \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 - a \cdot i\right)\right)\\ \mathbf{elif}\;x \le -6.61603541794831684 \cdot 10^{-230}:\\ \;\;\;\;j \cdot \left(t \cdot c - y \cdot i\right) + \left(x \cdot \left(y \cdot z - t \cdot a\right) - \left(\left(\sqrt[3]{c} \cdot \sqrt[3]{c}\right) \cdot \left(z \cdot \left(b \cdot \sqrt[3]{c}\right)\right) + a \cdot \left(b \cdot \left(-i\right)\right)\right)\right)\\ \mathbf{elif}\;x \le 13889868.629110064:\\ \;\;\;\;j \cdot \left(t \cdot c - y \cdot i\right) + \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 - a \cdot i\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(y \cdot z - t \cdot a\right) - \left(c \cdot \left(z \cdot b\right) + a \cdot \left(b \cdot \left(-i\right)\right)\right)\\ \end{array}\]

Reproduce

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