Average Error: 12.4 → 11.0
Time: 30.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}\;z \le -1.407294655337363409390207357488281107062 \cdot 10^{82} \lor \neg \left(z \le 2.275791592381623542258062938872532073384 \cdot 10^{83}\right):\\ \;\;\;\;\mathsf{fma}\left(t \cdot c - y \cdot i, j, \mathsf{fma}\left(-t \cdot a, x, z \cdot \mathsf{fma}\left(y, x, -b \cdot c\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(t \cdot c - y \cdot i, j, \mathsf{fma}\left(b, a \cdot i - c \cdot z, \left(\sqrt[3]{\mathsf{fma}\left(-a, t, y \cdot z\right)} \cdot \sqrt[3]{\mathsf{fma}\left(-a, t, y \cdot z\right)}\right) \cdot \left(\sqrt[3]{\mathsf{fma}\left(-a, t, y \cdot z\right)} \cdot x\right)\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 -1.407294655337363409390207357488281107062 \cdot 10^{82} \lor \neg \left(z \le 2.275791592381623542258062938872532073384 \cdot 10^{83}\right):\\
\;\;\;\;\mathsf{fma}\left(t \cdot c - y \cdot i, j, \mathsf{fma}\left(-t \cdot a, x, z \cdot \mathsf{fma}\left(y, x, -b \cdot c\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t \cdot c - y \cdot i, j, \mathsf{fma}\left(b, a \cdot i - c \cdot z, \left(\sqrt[3]{\mathsf{fma}\left(-a, t, y \cdot z\right)} \cdot \sqrt[3]{\mathsf{fma}\left(-a, t, y \cdot z\right)}\right) \cdot \left(\sqrt[3]{\mathsf{fma}\left(-a, t, y \cdot z\right)} \cdot x\right)\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 r101809 = x;
        double r101810 = y;
        double r101811 = z;
        double r101812 = r101810 * r101811;
        double r101813 = t;
        double r101814 = a;
        double r101815 = r101813 * r101814;
        double r101816 = r101812 - r101815;
        double r101817 = r101809 * r101816;
        double r101818 = b;
        double r101819 = c;
        double r101820 = r101819 * r101811;
        double r101821 = i;
        double r101822 = r101821 * r101814;
        double r101823 = r101820 - r101822;
        double r101824 = r101818 * r101823;
        double r101825 = r101817 - r101824;
        double r101826 = j;
        double r101827 = r101819 * r101813;
        double r101828 = r101821 * r101810;
        double r101829 = r101827 - r101828;
        double r101830 = r101826 * r101829;
        double r101831 = r101825 + r101830;
        return r101831;
}

double f(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
        double r101832 = z;
        double r101833 = -1.4072946553373634e+82;
        bool r101834 = r101832 <= r101833;
        double r101835 = 2.2757915923816235e+83;
        bool r101836 = r101832 <= r101835;
        double r101837 = !r101836;
        bool r101838 = r101834 || r101837;
        double r101839 = t;
        double r101840 = c;
        double r101841 = r101839 * r101840;
        double r101842 = y;
        double r101843 = i;
        double r101844 = r101842 * r101843;
        double r101845 = r101841 - r101844;
        double r101846 = j;
        double r101847 = a;
        double r101848 = r101839 * r101847;
        double r101849 = -r101848;
        double r101850 = x;
        double r101851 = b;
        double r101852 = r101851 * r101840;
        double r101853 = -r101852;
        double r101854 = fma(r101842, r101850, r101853);
        double r101855 = r101832 * r101854;
        double r101856 = fma(r101849, r101850, r101855);
        double r101857 = fma(r101845, r101846, r101856);
        double r101858 = r101847 * r101843;
        double r101859 = r101840 * r101832;
        double r101860 = r101858 - r101859;
        double r101861 = -r101847;
        double r101862 = r101842 * r101832;
        double r101863 = fma(r101861, r101839, r101862);
        double r101864 = cbrt(r101863);
        double r101865 = r101864 * r101864;
        double r101866 = r101864 * r101850;
        double r101867 = r101865 * r101866;
        double r101868 = fma(r101851, r101860, r101867);
        double r101869 = fma(r101845, r101846, r101868);
        double r101870 = r101838 ? r101857 : r101869;
        return r101870;
}

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 < -1.4072946553373634e+82 or 2.2757915923816235e+83 < z

    1. Initial program 19.8

      \[\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. Simplified19.8

      \[\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-cbrt20.1

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

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

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

      \[\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)\]
    8. Simplified13.4

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

    if -1.4072946553373634e+82 < z < 2.2757915923816235e+83

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

      \[\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-cbrt10.2

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

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

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

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

Reproduce

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