Average Error: 12.3 → 10.4
Time: 31.6s
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 r92196 = x;
        double r92197 = y;
        double r92198 = z;
        double r92199 = r92197 * r92198;
        double r92200 = t;
        double r92201 = a;
        double r92202 = r92200 * r92201;
        double r92203 = r92199 - r92202;
        double r92204 = r92196 * r92203;
        double r92205 = b;
        double r92206 = c;
        double r92207 = r92206 * r92198;
        double r92208 = i;
        double r92209 = r92208 * r92201;
        double r92210 = r92207 - r92209;
        double r92211 = r92205 * r92210;
        double r92212 = r92204 - r92211;
        double r92213 = j;
        double r92214 = r92206 * r92200;
        double r92215 = r92208 * r92197;
        double r92216 = r92214 - r92215;
        double r92217 = r92213 * r92216;
        double r92218 = r92212 + r92217;
        return r92218;
}

double f(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
        double r92219 = z;
        double r92220 = -2.1482946555590227e+74;
        bool r92221 = r92219 <= r92220;
        double r92222 = 4.6256669465840515e+42;
        bool r92223 = r92219 <= r92222;
        double r92224 = !r92223;
        bool r92225 = r92221 || r92224;
        double r92226 = t;
        double r92227 = c;
        double r92228 = r92226 * r92227;
        double r92229 = y;
        double r92230 = i;
        double r92231 = r92229 * r92230;
        double r92232 = r92228 - r92231;
        double r92233 = j;
        double r92234 = a;
        double r92235 = x;
        double r92236 = r92235 * r92226;
        double r92237 = -r92236;
        double r92238 = r92235 * r92229;
        double r92239 = b;
        double r92240 = r92239 * r92227;
        double r92241 = r92238 - r92240;
        double r92242 = r92219 * r92241;
        double r92243 = fma(r92234, r92237, r92242);
        double r92244 = fma(r92232, r92233, r92243);
        double r92245 = -r92229;
        double r92246 = fma(r92230, r92245, r92228);
        double r92247 = cbrt(r92246);
        double r92248 = r92247 * r92247;
        double r92249 = r92247 * r92248;
        double r92250 = r92234 * r92230;
        double r92251 = r92227 * r92219;
        double r92252 = r92250 - r92251;
        double r92253 = -r92234;
        double r92254 = r92229 * r92219;
        double r92255 = fma(r92253, r92226, r92254);
        double r92256 = r92255 * r92235;
        double r92257 = fma(r92239, r92252, r92256);
        double r92258 = fma(r92249, r92233, r92257);
        double r92259 = r92225 ? r92244 : r92258;
        return r92259;
}

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)))))