Average Error: 12.1 → 13.1
Time: 19.3s
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}\;c \le 8.019229054588489985064115706344396752848 \cdot 10^{-225} \lor \neg \left(c \le 1.128905115509222076296604198732927607533 \cdot 10^{-156}\right) \land c \le 30615112571703145791488:\\ \;\;\;\;\mathsf{fma}\left(x, y \cdot z - t \cdot a, \mathsf{fma}\left(b, i \cdot a - c \cdot z, \left(j \cdot \left(\sqrt[3]{c \cdot t - i \cdot y} \cdot \sqrt[3]{c \cdot t - i \cdot y}\right)\right) \cdot \left(\sqrt[3]{\sqrt[3]{c \cdot t - i \cdot y} \cdot \sqrt[3]{c \cdot t - i \cdot y}} \cdot \sqrt[3]{\sqrt[3]{c \cdot t - i \cdot y}}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(x, y \cdot z - t \cdot a, c \cdot \left(t \cdot j - z \cdot b\right) - i \cdot \left(y \cdot j\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}\;c \le 8.019229054588489985064115706344396752848 \cdot 10^{-225} \lor \neg \left(c \le 1.128905115509222076296604198732927607533 \cdot 10^{-156}\right) \land c \le 30615112571703145791488:\\
\;\;\;\;\mathsf{fma}\left(x, y \cdot z - t \cdot a, \mathsf{fma}\left(b, i \cdot a - c \cdot z, \left(j \cdot \left(\sqrt[3]{c \cdot t - i \cdot y} \cdot \sqrt[3]{c \cdot t - i \cdot y}\right)\right) \cdot \left(\sqrt[3]{\sqrt[3]{c \cdot t - i \cdot y} \cdot \sqrt[3]{c \cdot t - i \cdot y}} \cdot \sqrt[3]{\sqrt[3]{c \cdot t - i \cdot y}}\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x, y \cdot z - t \cdot a, c \cdot \left(t \cdot j - z \cdot b\right) - i \cdot \left(y \cdot j\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 r121841 = x;
        double r121842 = y;
        double r121843 = z;
        double r121844 = r121842 * r121843;
        double r121845 = t;
        double r121846 = a;
        double r121847 = r121845 * r121846;
        double r121848 = r121844 - r121847;
        double r121849 = r121841 * r121848;
        double r121850 = b;
        double r121851 = c;
        double r121852 = r121851 * r121843;
        double r121853 = i;
        double r121854 = r121853 * r121846;
        double r121855 = r121852 - r121854;
        double r121856 = r121850 * r121855;
        double r121857 = r121849 - r121856;
        double r121858 = j;
        double r121859 = r121851 * r121845;
        double r121860 = r121853 * r121842;
        double r121861 = r121859 - r121860;
        double r121862 = r121858 * r121861;
        double r121863 = r121857 + r121862;
        return r121863;
}

double f(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
        double r121864 = c;
        double r121865 = 8.01922905458849e-225;
        bool r121866 = r121864 <= r121865;
        double r121867 = 1.1289051155092221e-156;
        bool r121868 = r121864 <= r121867;
        double r121869 = !r121868;
        double r121870 = 3.0615112571703146e+22;
        bool r121871 = r121864 <= r121870;
        bool r121872 = r121869 && r121871;
        bool r121873 = r121866 || r121872;
        double r121874 = x;
        double r121875 = y;
        double r121876 = z;
        double r121877 = r121875 * r121876;
        double r121878 = t;
        double r121879 = a;
        double r121880 = r121878 * r121879;
        double r121881 = r121877 - r121880;
        double r121882 = b;
        double r121883 = i;
        double r121884 = r121883 * r121879;
        double r121885 = r121864 * r121876;
        double r121886 = r121884 - r121885;
        double r121887 = j;
        double r121888 = r121864 * r121878;
        double r121889 = r121883 * r121875;
        double r121890 = r121888 - r121889;
        double r121891 = cbrt(r121890);
        double r121892 = r121891 * r121891;
        double r121893 = r121887 * r121892;
        double r121894 = cbrt(r121892);
        double r121895 = cbrt(r121891);
        double r121896 = r121894 * r121895;
        double r121897 = r121893 * r121896;
        double r121898 = fma(r121882, r121886, r121897);
        double r121899 = fma(r121874, r121881, r121898);
        double r121900 = r121878 * r121887;
        double r121901 = r121876 * r121882;
        double r121902 = r121900 - r121901;
        double r121903 = r121864 * r121902;
        double r121904 = r121875 * r121887;
        double r121905 = r121883 * r121904;
        double r121906 = r121903 - r121905;
        double r121907 = fma(r121874, r121881, r121906);
        double r121908 = r121873 ? r121899 : r121907;
        return r121908;
}

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 c < 8.01922905458849e-225 or 1.1289051155092221e-156 < c < 3.0615112571703146e+22

    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. Simplified11.3

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

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

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

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

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

    if 8.01922905458849e-225 < c < 1.1289051155092221e-156 or 3.0615112571703146e+22 < c

    1. Initial program 14.7

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

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

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

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

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

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

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

Reproduce

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