Average Error: 12.0 → 12.7
Time: 13.1s
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}\;x \le -3.3735883346778377 \cdot 10^{-126} \lor \neg \left(x \le 3.288698165822717 \cdot 10^{-124}\right):\\ \;\;\;\;\left(c \cdot t - i \cdot y\right) \cdot j + \left(\left(x \cdot \mathsf{fma}\left(y, z, -a \cdot t\right) + x \cdot \mathsf{fma}\left(-a, t, a \cdot t\right)\right) - \left(b \cdot \left(\sqrt[3]{c \cdot z - i \cdot a} \cdot \sqrt[3]{c \cdot z - i \cdot a}\right)\right) \cdot \sqrt[3]{c \cdot z - i \cdot a}\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(c \cdot t - i \cdot y, j, 0 - b \cdot \left(c \cdot z - i \cdot a\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}\;x \le -3.3735883346778377 \cdot 10^{-126} \lor \neg \left(x \le 3.288698165822717 \cdot 10^{-124}\right):\\
\;\;\;\;\left(c \cdot t - i \cdot y\right) \cdot j + \left(\left(x \cdot \mathsf{fma}\left(y, z, -a \cdot t\right) + x \cdot \mathsf{fma}\left(-a, t, a \cdot t\right)\right) - \left(b \cdot \left(\sqrt[3]{c \cdot z - i \cdot a} \cdot \sqrt[3]{c \cdot z - i \cdot a}\right)\right) \cdot \sqrt[3]{c \cdot z - i \cdot a}\right)\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(c \cdot t - i \cdot y, j, 0 - b \cdot \left(c \cdot z - i \cdot a\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 r147868 = x;
        double r147869 = y;
        double r147870 = z;
        double r147871 = r147869 * r147870;
        double r147872 = t;
        double r147873 = a;
        double r147874 = r147872 * r147873;
        double r147875 = r147871 - r147874;
        double r147876 = r147868 * r147875;
        double r147877 = b;
        double r147878 = c;
        double r147879 = r147878 * r147870;
        double r147880 = i;
        double r147881 = r147880 * r147873;
        double r147882 = r147879 - r147881;
        double r147883 = r147877 * r147882;
        double r147884 = r147876 - r147883;
        double r147885 = j;
        double r147886 = r147878 * r147872;
        double r147887 = r147880 * r147869;
        double r147888 = r147886 - r147887;
        double r147889 = r147885 * r147888;
        double r147890 = r147884 + r147889;
        return r147890;
}

double f(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
        double r147891 = x;
        double r147892 = -3.373588334677838e-126;
        bool r147893 = r147891 <= r147892;
        double r147894 = 3.288698165822717e-124;
        bool r147895 = r147891 <= r147894;
        double r147896 = !r147895;
        bool r147897 = r147893 || r147896;
        double r147898 = c;
        double r147899 = t;
        double r147900 = r147898 * r147899;
        double r147901 = i;
        double r147902 = y;
        double r147903 = r147901 * r147902;
        double r147904 = r147900 - r147903;
        double r147905 = j;
        double r147906 = r147904 * r147905;
        double r147907 = z;
        double r147908 = a;
        double r147909 = r147908 * r147899;
        double r147910 = -r147909;
        double r147911 = fma(r147902, r147907, r147910);
        double r147912 = r147891 * r147911;
        double r147913 = -r147908;
        double r147914 = fma(r147913, r147899, r147909);
        double r147915 = r147891 * r147914;
        double r147916 = r147912 + r147915;
        double r147917 = b;
        double r147918 = r147898 * r147907;
        double r147919 = r147901 * r147908;
        double r147920 = r147918 - r147919;
        double r147921 = cbrt(r147920);
        double r147922 = r147921 * r147921;
        double r147923 = r147917 * r147922;
        double r147924 = r147923 * r147921;
        double r147925 = r147916 - r147924;
        double r147926 = r147906 + r147925;
        double r147927 = 0.0;
        double r147928 = r147917 * r147920;
        double r147929 = r147927 - r147928;
        double r147930 = fma(r147904, r147905, r147929);
        double r147931 = r147897 ? r147926 : r147930;
        return r147931;
}

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 x < -3.373588334677838e-126 or 3.288698165822717e-124 < x

    1. Initial program 9.6

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

      \[\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-diff9.6

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

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

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

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

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

    if -3.373588334677838e-126 < x < 3.288698165822717e-124

    1. Initial program 16.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. Simplified16.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. Taylor expanded around 0 17.6

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

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

Reproduce

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