Average Error: 12.4 → 12.3
Time: 11.5s
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}\;a \le -2.329574615195142828419975702711333531113 \cdot 10^{-268}:\\ \;\;\;\;\mathsf{fma}\left(c \cdot t - i \cdot y, j, \left(\left(x \cdot y\right) \cdot z + {\left(-1 \cdot \left(a \cdot \left(x \cdot t\right)\right)\right)}^{1}\right) - \left(b \cdot \left(c \cdot z - i \cdot a\right) + b \cdot \mathsf{fma}\left(-a, i, a \cdot i\right)\right)\right)\\ \mathbf{elif}\;a \le 1.622426989727679313206537450117033416418 \cdot 10^{122}:\\ \;\;\;\;\mathsf{fma}\left(c \cdot t - i \cdot y, j, \left(\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \left(\sqrt[3]{x} \cdot \left(y \cdot z\right)\right) + x \cdot \left(-t \cdot a\right)\right) - \left(b \cdot \left(c \cdot z - i \cdot a\right) + b \cdot \mathsf{fma}\left(-a, i, a \cdot i\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(a, i \cdot b, -\mathsf{fma}\left(z, b \cdot c, a \cdot \left(x \cdot t\right)\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}\;a \le -2.329574615195142828419975702711333531113 \cdot 10^{-268}:\\
\;\;\;\;\mathsf{fma}\left(c \cdot t - i \cdot y, j, \left(\left(x \cdot y\right) \cdot z + {\left(-1 \cdot \left(a \cdot \left(x \cdot t\right)\right)\right)}^{1}\right) - \left(b \cdot \left(c \cdot z - i \cdot a\right) + b \cdot \mathsf{fma}\left(-a, i, a \cdot i\right)\right)\right)\\

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

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a, i \cdot b, -\mathsf{fma}\left(z, b \cdot c, a \cdot \left(x \cdot t\right)\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 r100689 = x;
        double r100690 = y;
        double r100691 = z;
        double r100692 = r100690 * r100691;
        double r100693 = t;
        double r100694 = a;
        double r100695 = r100693 * r100694;
        double r100696 = r100692 - r100695;
        double r100697 = r100689 * r100696;
        double r100698 = b;
        double r100699 = c;
        double r100700 = r100699 * r100691;
        double r100701 = i;
        double r100702 = r100701 * r100694;
        double r100703 = r100700 - r100702;
        double r100704 = r100698 * r100703;
        double r100705 = r100697 - r100704;
        double r100706 = j;
        double r100707 = r100699 * r100693;
        double r100708 = r100701 * r100690;
        double r100709 = r100707 - r100708;
        double r100710 = r100706 * r100709;
        double r100711 = r100705 + r100710;
        return r100711;
}

double f(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
        double r100712 = a;
        double r100713 = -2.3295746151951428e-268;
        bool r100714 = r100712 <= r100713;
        double r100715 = c;
        double r100716 = t;
        double r100717 = r100715 * r100716;
        double r100718 = i;
        double r100719 = y;
        double r100720 = r100718 * r100719;
        double r100721 = r100717 - r100720;
        double r100722 = j;
        double r100723 = x;
        double r100724 = r100723 * r100719;
        double r100725 = z;
        double r100726 = r100724 * r100725;
        double r100727 = -1.0;
        double r100728 = r100723 * r100716;
        double r100729 = r100712 * r100728;
        double r100730 = r100727 * r100729;
        double r100731 = 1.0;
        double r100732 = pow(r100730, r100731);
        double r100733 = r100726 + r100732;
        double r100734 = b;
        double r100735 = r100715 * r100725;
        double r100736 = r100718 * r100712;
        double r100737 = r100735 - r100736;
        double r100738 = r100734 * r100737;
        double r100739 = -r100712;
        double r100740 = r100712 * r100718;
        double r100741 = fma(r100739, r100718, r100740);
        double r100742 = r100734 * r100741;
        double r100743 = r100738 + r100742;
        double r100744 = r100733 - r100743;
        double r100745 = fma(r100721, r100722, r100744);
        double r100746 = 1.6224269897276793e+122;
        bool r100747 = r100712 <= r100746;
        double r100748 = cbrt(r100723);
        double r100749 = r100748 * r100748;
        double r100750 = r100719 * r100725;
        double r100751 = r100748 * r100750;
        double r100752 = r100749 * r100751;
        double r100753 = r100716 * r100712;
        double r100754 = -r100753;
        double r100755 = r100723 * r100754;
        double r100756 = r100752 + r100755;
        double r100757 = r100756 - r100743;
        double r100758 = fma(r100721, r100722, r100757);
        double r100759 = r100718 * r100734;
        double r100760 = r100734 * r100715;
        double r100761 = fma(r100725, r100760, r100729);
        double r100762 = -r100761;
        double r100763 = fma(r100712, r100759, r100762);
        double r100764 = r100747 ? r100758 : r100763;
        double r100765 = r100714 ? r100745 : r100764;
        return r100765;
}

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

Derivation

  1. Split input into 3 regimes
  2. if a < -2.3295746151951428e-268

    1. Initial program 12.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. Simplified12.2

      \[\leadsto \color{blue}{\mathsf{fma}\left(c \cdot t - i \cdot y, j, x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right)}\]
    3. Using strategy rm
    4. Applied prod-diff12.2

      \[\leadsto \mathsf{fma}\left(c \cdot t - i \cdot y, j, x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \color{blue}{\left(\mathsf{fma}\left(c, z, -a \cdot i\right) + \mathsf{fma}\left(-a, i, a \cdot i\right)\right)}\right)\]
    5. Applied distribute-lft-in12.2

      \[\leadsto \mathsf{fma}\left(c \cdot t - i \cdot y, j, x \cdot \left(y \cdot z - t \cdot a\right) - \color{blue}{\left(b \cdot \mathsf{fma}\left(c, z, -a \cdot i\right) + b \cdot \mathsf{fma}\left(-a, i, a \cdot i\right)\right)}\right)\]
    6. Simplified12.2

      \[\leadsto \mathsf{fma}\left(c \cdot t - i \cdot y, j, x \cdot \left(y \cdot z - t \cdot a\right) - \left(\color{blue}{b \cdot \left(c \cdot z - i \cdot a\right)} + b \cdot \mathsf{fma}\left(-a, i, a \cdot i\right)\right)\right)\]
    7. Using strategy rm
    8. Applied sub-neg12.2

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

      \[\leadsto \mathsf{fma}\left(c \cdot t - i \cdot y, j, \color{blue}{\left(x \cdot \left(y \cdot z\right) + x \cdot \left(-t \cdot a\right)\right)} - \left(b \cdot \left(c \cdot z - i \cdot a\right) + b \cdot \mathsf{fma}\left(-a, i, a \cdot i\right)\right)\right)\]
    10. Using strategy rm
    11. Applied associate-*r*12.6

      \[\leadsto \mathsf{fma}\left(c \cdot t - i \cdot y, j, \left(\color{blue}{\left(x \cdot y\right) \cdot z} + x \cdot \left(-t \cdot a\right)\right) - \left(b \cdot \left(c \cdot z - i \cdot a\right) + b \cdot \mathsf{fma}\left(-a, i, a \cdot i\right)\right)\right)\]
    12. Using strategy rm
    13. Applied pow112.6

      \[\leadsto \mathsf{fma}\left(c \cdot t - i \cdot y, j, \left(\left(x \cdot y\right) \cdot z + x \cdot \color{blue}{{\left(-t \cdot a\right)}^{1}}\right) - \left(b \cdot \left(c \cdot z - i \cdot a\right) + b \cdot \mathsf{fma}\left(-a, i, a \cdot i\right)\right)\right)\]
    14. Applied pow112.6

      \[\leadsto \mathsf{fma}\left(c \cdot t - i \cdot y, j, \left(\left(x \cdot y\right) \cdot z + \color{blue}{{x}^{1}} \cdot {\left(-t \cdot a\right)}^{1}\right) - \left(b \cdot \left(c \cdot z - i \cdot a\right) + b \cdot \mathsf{fma}\left(-a, i, a \cdot i\right)\right)\right)\]
    15. Applied pow-prod-down12.6

      \[\leadsto \mathsf{fma}\left(c \cdot t - i \cdot y, j, \left(\left(x \cdot y\right) \cdot z + \color{blue}{{\left(x \cdot \left(-t \cdot a\right)\right)}^{1}}\right) - \left(b \cdot \left(c \cdot z - i \cdot a\right) + b \cdot \mathsf{fma}\left(-a, i, a \cdot i\right)\right)\right)\]
    16. Simplified12.4

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

    if -2.3295746151951428e-268 < a < 1.6224269897276793e+122

    1. Initial program 10.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. Simplified10.3

      \[\leadsto \color{blue}{\mathsf{fma}\left(c \cdot t - i \cdot y, j, x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right)}\]
    3. Using strategy rm
    4. Applied prod-diff10.3

      \[\leadsto \mathsf{fma}\left(c \cdot t - i \cdot y, j, x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \color{blue}{\left(\mathsf{fma}\left(c, z, -a \cdot i\right) + \mathsf{fma}\left(-a, i, a \cdot i\right)\right)}\right)\]
    5. Applied distribute-lft-in10.3

      \[\leadsto \mathsf{fma}\left(c \cdot t - i \cdot y, j, x \cdot \left(y \cdot z - t \cdot a\right) - \color{blue}{\left(b \cdot \mathsf{fma}\left(c, z, -a \cdot i\right) + b \cdot \mathsf{fma}\left(-a, i, a \cdot i\right)\right)}\right)\]
    6. Simplified10.3

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

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

      \[\leadsto \mathsf{fma}\left(c \cdot t - i \cdot y, j, \color{blue}{\left(x \cdot \left(y \cdot z\right) + x \cdot \left(-t \cdot a\right)\right)} - \left(b \cdot \left(c \cdot z - i \cdot a\right) + b \cdot \mathsf{fma}\left(-a, i, a \cdot i\right)\right)\right)\]
    10. Using strategy rm
    11. Applied add-cube-cbrt10.4

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

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

    if 1.6224269897276793e+122 < a

    1. Initial program 23.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. Simplified23.1

      \[\leadsto \color{blue}{\mathsf{fma}\left(c \cdot t - i \cdot y, j, x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right)}\]
    3. Taylor expanded around inf 20.7

      \[\leadsto \color{blue}{a \cdot \left(i \cdot b\right) - \left(z \cdot \left(b \cdot c\right) + a \cdot \left(x \cdot t\right)\right)}\]
    4. Simplified20.7

      \[\leadsto \color{blue}{\mathsf{fma}\left(a, i \cdot b, -\mathsf{fma}\left(z, b \cdot c, a \cdot \left(x \cdot t\right)\right)\right)}\]
  3. Recombined 3 regimes into one program.
  4. Final simplification12.3

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \le -2.329574615195142828419975702711333531113 \cdot 10^{-268}:\\ \;\;\;\;\mathsf{fma}\left(c \cdot t - i \cdot y, j, \left(\left(x \cdot y\right) \cdot z + {\left(-1 \cdot \left(a \cdot \left(x \cdot t\right)\right)\right)}^{1}\right) - \left(b \cdot \left(c \cdot z - i \cdot a\right) + b \cdot \mathsf{fma}\left(-a, i, a \cdot i\right)\right)\right)\\ \mathbf{elif}\;a \le 1.622426989727679313206537450117033416418 \cdot 10^{122}:\\ \;\;\;\;\mathsf{fma}\left(c \cdot t - i \cdot y, j, \left(\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \left(\sqrt[3]{x} \cdot \left(y \cdot z\right)\right) + x \cdot \left(-t \cdot a\right)\right) - \left(b \cdot \left(c \cdot z - i \cdot a\right) + b \cdot \mathsf{fma}\left(-a, i, a \cdot i\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(a, i \cdot b, -\mathsf{fma}\left(z, b \cdot c, a \cdot \left(x \cdot t\right)\right)\right)\\ \end{array}\]

Reproduce

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