Average Error: 12.2 → 11.8
Time: 25.1s
Precision: 64
\[\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}\;j \le -9.929536798422278605563067575704178711758 \cdot 10^{96}:\\ \;\;\;\;j \cdot \left(c \cdot t - i \cdot y\right) + \left(-b \cdot \left(c \cdot z - i \cdot a\right)\right)\\ \mathbf{elif}\;j \le -1.098607656333811782069347702956620830271 \cdot 10^{-146}:\\ \;\;\;\;\left(t \cdot \left(j \cdot c\right) + \left(-i \cdot \left(j \cdot y\right)\right)\right) + \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right)\\ \mathbf{elif}\;j \le -6.651508483195953646948775651706394971033 \cdot 10^{-258}:\\ \;\;\;\;\left(x \cdot \left(y \cdot z - t \cdot a\right) - \left(z \cdot \left(b \cdot c\right) + \left(-i \cdot a\right) \cdot b\right)\right) + \left(c \cdot \left(t \cdot j\right) + \left(-i \cdot \left(j \cdot y\right)\right)\right)\\ \mathbf{elif}\;j \le 2.649066615389731199752472489106042554466 \cdot 10^{253}:\\ \;\;\;\;\left(x \cdot \left(y \cdot z - t \cdot a\right) - \left(b \cdot \left(\sqrt[3]{c \cdot z - i \cdot a} \cdot \sqrt[3]{c \cdot z - i \cdot a}\right)\right) \cdot \sqrt[3]{c \cdot z - i \cdot a}\right) + \left(c \cdot \left(t \cdot j\right) + \left(-i \cdot \left(j \cdot y\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;j \cdot \left(c \cdot t - i \cdot y\right) + \left(-b \cdot \left(c \cdot z - i \cdot a\right)\right)\\ \end{array}\]
\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}\;j \le -9.929536798422278605563067575704178711758 \cdot 10^{96}:\\
\;\;\;\;j \cdot \left(c \cdot t - i \cdot y\right) + \left(-b \cdot \left(c \cdot z - i \cdot a\right)\right)\\

\mathbf{elif}\;j \le -1.098607656333811782069347702956620830271 \cdot 10^{-146}:\\
\;\;\;\;\left(t \cdot \left(j \cdot c\right) + \left(-i \cdot \left(j \cdot y\right)\right)\right) + \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right)\\

\mathbf{elif}\;j \le -6.651508483195953646948775651706394971033 \cdot 10^{-258}:\\
\;\;\;\;\left(x \cdot \left(y \cdot z - t \cdot a\right) - \left(z \cdot \left(b \cdot c\right) + \left(-i \cdot a\right) \cdot b\right)\right) + \left(c \cdot \left(t \cdot j\right) + \left(-i \cdot \left(j \cdot y\right)\right)\right)\\

\mathbf{elif}\;j \le 2.649066615389731199752472489106042554466 \cdot 10^{253}:\\
\;\;\;\;\left(x \cdot \left(y \cdot z - t \cdot a\right) - \left(b \cdot \left(\sqrt[3]{c \cdot z - i \cdot a} \cdot \sqrt[3]{c \cdot z - i \cdot a}\right)\right) \cdot \sqrt[3]{c \cdot z - i \cdot a}\right) + \left(c \cdot \left(t \cdot j\right) + \left(-i \cdot \left(j \cdot y\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;j \cdot \left(c \cdot t - i \cdot y\right) + \left(-b \cdot \left(c \cdot z - i \cdot a\right)\right)\\

\end{array}
double f(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
        double r393576 = x;
        double r393577 = y;
        double r393578 = z;
        double r393579 = r393577 * r393578;
        double r393580 = t;
        double r393581 = a;
        double r393582 = r393580 * r393581;
        double r393583 = r393579 - r393582;
        double r393584 = r393576 * r393583;
        double r393585 = b;
        double r393586 = c;
        double r393587 = r393586 * r393578;
        double r393588 = i;
        double r393589 = r393588 * r393581;
        double r393590 = r393587 - r393589;
        double r393591 = r393585 * r393590;
        double r393592 = r393584 - r393591;
        double r393593 = j;
        double r393594 = r393586 * r393580;
        double r393595 = r393588 * r393577;
        double r393596 = r393594 - r393595;
        double r393597 = r393593 * r393596;
        double r393598 = r393592 + r393597;
        return r393598;
}

double f(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
        double r393599 = j;
        double r393600 = -9.929536798422279e+96;
        bool r393601 = r393599 <= r393600;
        double r393602 = c;
        double r393603 = t;
        double r393604 = r393602 * r393603;
        double r393605 = i;
        double r393606 = y;
        double r393607 = r393605 * r393606;
        double r393608 = r393604 - r393607;
        double r393609 = r393599 * r393608;
        double r393610 = b;
        double r393611 = z;
        double r393612 = r393602 * r393611;
        double r393613 = a;
        double r393614 = r393605 * r393613;
        double r393615 = r393612 - r393614;
        double r393616 = r393610 * r393615;
        double r393617 = -r393616;
        double r393618 = r393609 + r393617;
        double r393619 = -1.0986076563338118e-146;
        bool r393620 = r393599 <= r393619;
        double r393621 = r393599 * r393602;
        double r393622 = r393603 * r393621;
        double r393623 = r393599 * r393606;
        double r393624 = r393605 * r393623;
        double r393625 = -r393624;
        double r393626 = r393622 + r393625;
        double r393627 = x;
        double r393628 = r393606 * r393611;
        double r393629 = r393603 * r393613;
        double r393630 = r393628 - r393629;
        double r393631 = r393627 * r393630;
        double r393632 = r393631 - r393616;
        double r393633 = r393626 + r393632;
        double r393634 = -6.651508483195954e-258;
        bool r393635 = r393599 <= r393634;
        double r393636 = r393610 * r393602;
        double r393637 = r393611 * r393636;
        double r393638 = -r393614;
        double r393639 = r393638 * r393610;
        double r393640 = r393637 + r393639;
        double r393641 = r393631 - r393640;
        double r393642 = r393603 * r393599;
        double r393643 = r393602 * r393642;
        double r393644 = r393643 + r393625;
        double r393645 = r393641 + r393644;
        double r393646 = 2.6490666153897312e+253;
        bool r393647 = r393599 <= r393646;
        double r393648 = cbrt(r393615);
        double r393649 = r393648 * r393648;
        double r393650 = r393610 * r393649;
        double r393651 = r393650 * r393648;
        double r393652 = r393631 - r393651;
        double r393653 = r393652 + r393644;
        double r393654 = r393647 ? r393653 : r393618;
        double r393655 = r393635 ? r393645 : r393654;
        double r393656 = r393620 ? r393633 : r393655;
        double r393657 = r393601 ? r393618 : r393656;
        return r393657;
}

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

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original12.2
Target16.1
Herbie11.8
\[\begin{array}{l} \mathbf{if}\;t \lt -8.12097891919591218149793027759825150959 \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.712553818218485141757938537793350881052 \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.633533346031583686060259351057142920433 \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.053588855745548710002760210539645467715 \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 j < -9.929536798422279e+96 or 2.6490666153897312e+253 < j

    1. Initial program 7.3

      \[\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 0 15.8

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

    if -9.929536798422279e+96 < j < -1.0986076563338118e-146

    1. Initial program 11.3

      \[\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-neg11.3

      \[\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-in11.3

      \[\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. Simplified11.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}{\left(c \cdot t\right) \cdot j} + j \cdot \left(-i \cdot y\right)\right)\]
    6. Simplified10.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(\left(c \cdot t\right) \cdot j + \color{blue}{\left(-i \cdot \left(j \cdot y\right)\right)}\right)\]
    7. Using strategy rm
    8. Applied associate-*l*9.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(\color{blue}{c \cdot \left(t \cdot j\right)} + \left(-i \cdot \left(j \cdot y\right)\right)\right)\]
    9. Using strategy rm
    10. Applied *-un-lft-identity9.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(\color{blue}{\left(1 \cdot c\right)} \cdot \left(t \cdot j\right) + \left(-i \cdot \left(j \cdot y\right)\right)\right)\]
    11. Applied associate-*l*9.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(\color{blue}{1 \cdot \left(c \cdot \left(t \cdot j\right)\right)} + \left(-i \cdot \left(j \cdot y\right)\right)\right)\]
    12. Simplified9.1

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

    if -1.0986076563338118e-146 < j < -6.651508483195954e-258

    1. Initial program 17.1

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

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

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

      \[\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 t\right) \cdot j} + j \cdot \left(-i \cdot y\right)\right)\]
    6. Simplified14.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(\left(c \cdot t\right) \cdot j + \color{blue}{\left(-i \cdot \left(j \cdot y\right)\right)}\right)\]
    7. Using strategy rm
    8. Applied associate-*l*10.9

      \[\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(t \cdot j\right)} + \left(-i \cdot \left(j \cdot y\right)\right)\right)\]
    9. Using strategy rm
    10. Applied sub-neg10.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) + \left(c \cdot \left(t \cdot j\right) + \left(-i \cdot \left(j \cdot y\right)\right)\right)\]
    11. Applied distribute-lft-in10.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) + \left(c \cdot \left(t \cdot j\right) + \left(-i \cdot \left(j \cdot y\right)\right)\right)\]
    12. Simplified11.5

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

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

    if -6.651508483195954e-258 < j < 2.6490666153897312e+253

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

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

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

      \[\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 t\right) \cdot j} + j \cdot \left(-i \cdot y\right)\right)\]
    6. 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(\left(c \cdot t\right) \cdot j + \color{blue}{\left(-i \cdot \left(j \cdot y\right)\right)}\right)\]
    7. Using strategy rm
    8. Applied associate-*l*11.6

      \[\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(t \cdot j\right)} + \left(-i \cdot \left(j \cdot y\right)\right)\right)\]
    9. Using strategy rm
    10. Applied add-cube-cbrt11.9

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;j \le -9.929536798422278605563067575704178711758 \cdot 10^{96}:\\ \;\;\;\;j \cdot \left(c \cdot t - i \cdot y\right) + \left(-b \cdot \left(c \cdot z - i \cdot a\right)\right)\\ \mathbf{elif}\;j \le -1.098607656333811782069347702956620830271 \cdot 10^{-146}:\\ \;\;\;\;\left(t \cdot \left(j \cdot c\right) + \left(-i \cdot \left(j \cdot y\right)\right)\right) + \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right)\\ \mathbf{elif}\;j \le -6.651508483195953646948775651706394971033 \cdot 10^{-258}:\\ \;\;\;\;\left(x \cdot \left(y \cdot z - t \cdot a\right) - \left(z \cdot \left(b \cdot c\right) + \left(-i \cdot a\right) \cdot b\right)\right) + \left(c \cdot \left(t \cdot j\right) + \left(-i \cdot \left(j \cdot y\right)\right)\right)\\ \mathbf{elif}\;j \le 2.649066615389731199752472489106042554466 \cdot 10^{253}:\\ \;\;\;\;\left(x \cdot \left(y \cdot z - t \cdot a\right) - \left(b \cdot \left(\sqrt[3]{c \cdot z - i \cdot a} \cdot \sqrt[3]{c \cdot z - i \cdot a}\right)\right) \cdot \sqrt[3]{c \cdot z - i \cdot a}\right) + \left(c \cdot \left(t \cdot j\right) + \left(-i \cdot \left(j \cdot y\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;j \cdot \left(c \cdot t - i \cdot y\right) + \left(-b \cdot \left(c \cdot z - i \cdot a\right)\right)\\ \end{array}\]

Reproduce

herbie shell --seed 2019325 
(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) (pow (* i y) 2))) (+ (* 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) (pow (* i y) 2))) (+ (* 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)))))