Average Error: 12.8 → 10.7
Time: 19.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}\;t \le -169506421327520498000:\\ \;\;\;\;\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + \left(t \cdot \left(j \cdot c\right) + \left(-i \cdot \left(j \cdot y\right)\right)\right)\\ \mathbf{elif}\;t \le 1.5794462607572958 \cdot 10^{-66}:\\ \;\;\;\;\left(\left(\left(x \cdot y\right) \cdot z + \left(-a \cdot \left(x \cdot t\right)\right)\right) - \left(z \cdot \left(b \cdot c\right) + \left(-a \cdot \left(i \cdot b\right)\right)\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right)\\ \mathbf{elif}\;t \le 2.29594827664662834 \cdot 10^{62} \lor \neg \left(t \le 3.61127424119256253 \cdot 10^{155}\right):\\ \;\;\;\;\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + \left(t \cdot \left(j \cdot c\right) + \left(-i \cdot \left(j \cdot y\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(x \cdot \left(y \cdot z\right) + \left(-\left(a \cdot x\right) \cdot t\right)\right) - \left(z \cdot \left(b \cdot c\right) + \left(-a \cdot \left(i \cdot b\right)\right)\right)\right) + j \cdot \left(c \cdot t - i \cdot 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

Target

Original12.8
Target16.6
Herbie10.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 3 regimes
  2. if t < -169506421327520498000 or 1.5794462607572958e-66 < t < 2.29594827664662834e62 or 3.61127424119256253e155 < t

    1. Initial program 16.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-neg16.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-in16.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.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}{t \cdot \left(j \cdot c\right)} + j \cdot \left(-i \cdot y\right)\right)\]
    6. Simplified12.7

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

    if -169506421327520498000 < t < 1.5794462607572958e-66

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

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

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

      \[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\right) - \left(\color{blue}{z \cdot \left(b \cdot c\right)} + b \cdot \left(-i \cdot a\right)\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right)\]
    6. Using strategy rm
    7. Applied distribute-rgt-neg-out10.2

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

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

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

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

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

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

    if 2.29594827664662834e62 < t < 3.61127424119256253e155

    1. Initial program 17.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-neg17.0

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

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

      \[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\right) - \left(\color{blue}{z \cdot \left(b \cdot c\right)} + b \cdot \left(-i \cdot a\right)\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right)\]
    6. Using strategy rm
    7. Applied distribute-rgt-neg-out17.6

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \le -169506421327520498000:\\ \;\;\;\;\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + \left(t \cdot \left(j \cdot c\right) + \left(-i \cdot \left(j \cdot y\right)\right)\right)\\ \mathbf{elif}\;t \le 1.5794462607572958 \cdot 10^{-66}:\\ \;\;\;\;\left(\left(\left(x \cdot y\right) \cdot z + \left(-a \cdot \left(x \cdot t\right)\right)\right) - \left(z \cdot \left(b \cdot c\right) + \left(-a \cdot \left(i \cdot b\right)\right)\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right)\\ \mathbf{elif}\;t \le 2.29594827664662834 \cdot 10^{62} \lor \neg \left(t \le 3.61127424119256253 \cdot 10^{155}\right):\\ \;\;\;\;\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + \left(t \cdot \left(j \cdot c\right) + \left(-i \cdot \left(j \cdot y\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(x \cdot \left(y \cdot z\right) + \left(-\left(a \cdot x\right) \cdot t\right)\right) - \left(z \cdot \left(b \cdot c\right) + \left(-a \cdot \left(i \cdot b\right)\right)\right)\right) + j \cdot \left(c \cdot t - i \cdot y\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)))))