Average Error: 12.0 → 12.1
Time: 35.8s
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}\;z \le 9.242667919964829558492511784649235589271 \cdot 10^{144}:\\ \;\;\;\;\mathsf{fma}\left(t \cdot c - y \cdot i, j, \mathsf{fma}\left(a \cdot i - c \cdot z, b, \left(\sqrt[3]{y \cdot z - t \cdot a} \cdot \left(\sqrt[3]{y \cdot z - t \cdot a} \cdot \sqrt[3]{y \cdot z - t \cdot a}\right)\right) \cdot x\right)\right)\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(x \cdot y - c \cdot b\right) - \left(t \cdot a\right) \cdot x\\ \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}\;z \le 9.242667919964829558492511784649235589271 \cdot 10^{144}:\\
\;\;\;\;\mathsf{fma}\left(t \cdot c - y \cdot i, j, \mathsf{fma}\left(a \cdot i - c \cdot z, b, \left(\sqrt[3]{y \cdot z - t \cdot a} \cdot \left(\sqrt[3]{y \cdot z - t \cdot a} \cdot \sqrt[3]{y \cdot z - t \cdot a}\right)\right) \cdot x\right)\right)\\

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

\end{array}
double f(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
        double r4669743 = x;
        double r4669744 = y;
        double r4669745 = z;
        double r4669746 = r4669744 * r4669745;
        double r4669747 = t;
        double r4669748 = a;
        double r4669749 = r4669747 * r4669748;
        double r4669750 = r4669746 - r4669749;
        double r4669751 = r4669743 * r4669750;
        double r4669752 = b;
        double r4669753 = c;
        double r4669754 = r4669753 * r4669745;
        double r4669755 = i;
        double r4669756 = r4669755 * r4669748;
        double r4669757 = r4669754 - r4669756;
        double r4669758 = r4669752 * r4669757;
        double r4669759 = r4669751 - r4669758;
        double r4669760 = j;
        double r4669761 = r4669753 * r4669747;
        double r4669762 = r4669755 * r4669744;
        double r4669763 = r4669761 - r4669762;
        double r4669764 = r4669760 * r4669763;
        double r4669765 = r4669759 + r4669764;
        return r4669765;
}

double f(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
        double r4669766 = z;
        double r4669767 = 9.24266791996483e+144;
        bool r4669768 = r4669766 <= r4669767;
        double r4669769 = t;
        double r4669770 = c;
        double r4669771 = r4669769 * r4669770;
        double r4669772 = y;
        double r4669773 = i;
        double r4669774 = r4669772 * r4669773;
        double r4669775 = r4669771 - r4669774;
        double r4669776 = j;
        double r4669777 = a;
        double r4669778 = r4669777 * r4669773;
        double r4669779 = r4669770 * r4669766;
        double r4669780 = r4669778 - r4669779;
        double r4669781 = b;
        double r4669782 = r4669772 * r4669766;
        double r4669783 = r4669769 * r4669777;
        double r4669784 = r4669782 - r4669783;
        double r4669785 = cbrt(r4669784);
        double r4669786 = r4669785 * r4669785;
        double r4669787 = r4669785 * r4669786;
        double r4669788 = x;
        double r4669789 = r4669787 * r4669788;
        double r4669790 = fma(r4669780, r4669781, r4669789);
        double r4669791 = fma(r4669775, r4669776, r4669790);
        double r4669792 = r4669788 * r4669772;
        double r4669793 = r4669770 * r4669781;
        double r4669794 = r4669792 - r4669793;
        double r4669795 = r4669766 * r4669794;
        double r4669796 = r4669783 * r4669788;
        double r4669797 = r4669795 - r4669796;
        double r4669798 = r4669768 ? r4669791 : r4669797;
        return r4669798;
}

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 2 regimes
  2. if z < 9.24266791996483e+144

    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. Simplified10.9

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

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

    if 9.24266791996483e+144 < z

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

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

      \[\leadsto \color{blue}{x \cdot \left(z \cdot y\right) - \left(z \cdot \left(b \cdot c\right) + a \cdot \left(x \cdot t\right)\right)}\]
    4. Simplified21.6

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

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

Reproduce

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