Average Error: 12.3 → 10.4
Time: 31.9s
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 -2.148294655559022721785844990352181458387 \cdot 10^{74} \lor \neg \left(z \le 4625666946584051459611692871641645220626000\right):\\ \;\;\;\;\mathsf{fma}\left(t \cdot c - y \cdot i, j, \mathsf{fma}\left(a, -x \cdot t, z \cdot \left(x \cdot y - b \cdot c\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\sqrt[3]{\mathsf{fma}\left(i, -y, t \cdot c\right)} \cdot \left(\sqrt[3]{\mathsf{fma}\left(i, -y, t \cdot c\right)} \cdot \sqrt[3]{\mathsf{fma}\left(i, -y, t \cdot c\right)}\right), j, \mathsf{fma}\left(b, a \cdot i - c \cdot z, \mathsf{fma}\left(-a, t, y \cdot z\right) \cdot x\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}\;z \le -2.148294655559022721785844990352181458387 \cdot 10^{74} \lor \neg \left(z \le 4625666946584051459611692871641645220626000\right):\\
\;\;\;\;\mathsf{fma}\left(t \cdot c - y \cdot i, j, \mathsf{fma}\left(a, -x \cdot t, z \cdot \left(x \cdot y - b \cdot c\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\sqrt[3]{\mathsf{fma}\left(i, -y, t \cdot c\right)} \cdot \left(\sqrt[3]{\mathsf{fma}\left(i, -y, t \cdot c\right)} \cdot \sqrt[3]{\mathsf{fma}\left(i, -y, t \cdot c\right)}\right), j, \mathsf{fma}\left(b, a \cdot i - c \cdot z, \mathsf{fma}\left(-a, t, y \cdot z\right) \cdot x\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 r91951 = x;
        double r91952 = y;
        double r91953 = z;
        double r91954 = r91952 * r91953;
        double r91955 = t;
        double r91956 = a;
        double r91957 = r91955 * r91956;
        double r91958 = r91954 - r91957;
        double r91959 = r91951 * r91958;
        double r91960 = b;
        double r91961 = c;
        double r91962 = r91961 * r91953;
        double r91963 = i;
        double r91964 = r91963 * r91956;
        double r91965 = r91962 - r91964;
        double r91966 = r91960 * r91965;
        double r91967 = r91959 - r91966;
        double r91968 = j;
        double r91969 = r91961 * r91955;
        double r91970 = r91963 * r91952;
        double r91971 = r91969 - r91970;
        double r91972 = r91968 * r91971;
        double r91973 = r91967 + r91972;
        return r91973;
}

double f(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
        double r91974 = z;
        double r91975 = -2.1482946555590227e+74;
        bool r91976 = r91974 <= r91975;
        double r91977 = 4.6256669465840515e+42;
        bool r91978 = r91974 <= r91977;
        double r91979 = !r91978;
        bool r91980 = r91976 || r91979;
        double r91981 = t;
        double r91982 = c;
        double r91983 = r91981 * r91982;
        double r91984 = y;
        double r91985 = i;
        double r91986 = r91984 * r91985;
        double r91987 = r91983 - r91986;
        double r91988 = j;
        double r91989 = a;
        double r91990 = x;
        double r91991 = r91990 * r91981;
        double r91992 = -r91991;
        double r91993 = r91990 * r91984;
        double r91994 = b;
        double r91995 = r91994 * r91982;
        double r91996 = r91993 - r91995;
        double r91997 = r91974 * r91996;
        double r91998 = fma(r91989, r91992, r91997);
        double r91999 = fma(r91987, r91988, r91998);
        double r92000 = -r91984;
        double r92001 = fma(r91985, r92000, r91983);
        double r92002 = cbrt(r92001);
        double r92003 = r92002 * r92002;
        double r92004 = r92002 * r92003;
        double r92005 = r91989 * r91985;
        double r92006 = r91982 * r91974;
        double r92007 = r92005 - r92006;
        double r92008 = -r91989;
        double r92009 = r91984 * r91974;
        double r92010 = fma(r92008, r91981, r92009);
        double r92011 = r92010 * r91990;
        double r92012 = fma(r91994, r92007, r92011);
        double r92013 = fma(r92004, r91988, r92012);
        double r92014 = r91980 ? r91999 : r92013;
        return r92014;
}

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 < -2.1482946555590227e+74 or 4.6256669465840515e+42 < z

    1. Initial program 20.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. Simplified20.3

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

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

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

    if -2.1482946555590227e+74 < z < 4.6256669465840515e+42

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

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

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

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

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

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

Reproduce

herbie shell --seed 2019194 +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)))))