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

\mathbf{elif}\;x \le 3.288698165822717 \cdot 10^{-124}:\\
\;\;\;\;\left(0 - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right)\\

\mathbf{else}:\\
\;\;\;\;\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) + \left(j \cdot \mathsf{fma}\left(c, t, -y \cdot i\right) + j \cdot \mathsf{fma}\left(-y, i, y \cdot i\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 r124906 = x;
        double r124907 = y;
        double r124908 = z;
        double r124909 = r124907 * r124908;
        double r124910 = t;
        double r124911 = a;
        double r124912 = r124910 * r124911;
        double r124913 = r124909 - r124912;
        double r124914 = r124906 * r124913;
        double r124915 = b;
        double r124916 = c;
        double r124917 = r124916 * r124908;
        double r124918 = i;
        double r124919 = r124918 * r124911;
        double r124920 = r124917 - r124919;
        double r124921 = r124915 * r124920;
        double r124922 = r124914 - r124921;
        double r124923 = j;
        double r124924 = r124916 * r124910;
        double r124925 = r124918 * r124907;
        double r124926 = r124924 - r124925;
        double r124927 = r124923 * r124926;
        double r124928 = r124922 + r124927;
        return r124928;
}

double f(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
        double r124929 = x;
        double r124930 = -3.373588334677838e-126;
        bool r124931 = r124929 <= r124930;
        double r124932 = y;
        double r124933 = z;
        double r124934 = a;
        double r124935 = t;
        double r124936 = r124934 * r124935;
        double r124937 = -r124936;
        double r124938 = fma(r124932, r124933, r124937);
        double r124939 = r124929 * r124938;
        double r124940 = -r124934;
        double r124941 = fma(r124940, r124935, r124936);
        double r124942 = r124929 * r124941;
        double r124943 = r124939 + r124942;
        double r124944 = b;
        double r124945 = c;
        double r124946 = r124945 * r124933;
        double r124947 = i;
        double r124948 = r124947 * r124934;
        double r124949 = r124946 - r124948;
        double r124950 = r124944 * r124949;
        double r124951 = r124943 - r124950;
        double r124952 = j;
        double r124953 = r124945 * r124935;
        double r124954 = r124947 * r124932;
        double r124955 = r124953 - r124954;
        double r124956 = cbrt(r124955);
        double r124957 = r124956 * r124956;
        double r124958 = r124952 * r124957;
        double r124959 = r124958 * r124956;
        double r124960 = r124951 + r124959;
        double r124961 = 3.288698165822717e-124;
        bool r124962 = r124929 <= r124961;
        double r124963 = 0.0;
        double r124964 = r124963 - r124950;
        double r124965 = r124952 * r124955;
        double r124966 = r124964 + r124965;
        double r124967 = cbrt(r124949);
        double r124968 = r124967 * r124967;
        double r124969 = r124944 * r124968;
        double r124970 = r124969 * r124967;
        double r124971 = r124943 - r124970;
        double r124972 = r124932 * r124947;
        double r124973 = -r124972;
        double r124974 = fma(r124945, r124935, r124973);
        double r124975 = r124952 * r124974;
        double r124976 = -r124932;
        double r124977 = fma(r124976, r124947, r124972);
        double r124978 = r124952 * r124977;
        double r124979 = r124975 + r124978;
        double r124980 = r124971 + r124979;
        double r124981 = r124962 ? r124966 : r124980;
        double r124982 = r124931 ? r124960 : r124981;
        return r124982;
}

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 3 regimes
  2. if x < -3.373588334677838e-126

    1. Initial program 9.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. Using strategy rm
    3. Applied prod-diff9.8

      \[\leadsto \left(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) + j \cdot \left(c \cdot t - i \cdot y\right)\]
    4. Applied distribute-lft-in9.8

      \[\leadsto \left(\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) + j \cdot \left(c \cdot t - i \cdot y\right)\]
    5. Using strategy rm
    6. Applied add-cube-cbrt10.0

      \[\leadsto \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) + 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)}\]
    7. Applied associate-*r*10.0

      \[\leadsto \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) + \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}}\]

    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. Taylor expanded around 0 17.6

      \[\leadsto \left(\color{blue}{0} - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right)\]

    if 3.288698165822717e-124 < x

    1. Initial program 9.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. Using strategy rm
    3. Applied prod-diff9.3

      \[\leadsto \left(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) + j \cdot \left(c \cdot t - i \cdot y\right)\]
    4. Applied distribute-lft-in9.3

      \[\leadsto \left(\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) + j \cdot \left(c \cdot t - i \cdot y\right)\]
    5. Using strategy rm
    6. Applied prod-diff9.3

      \[\leadsto \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) + j \cdot \color{blue}{\left(\mathsf{fma}\left(c, t, -y \cdot i\right) + \mathsf{fma}\left(-y, i, y \cdot i\right)\right)}\]
    7. Applied distribute-lft-in9.3

      \[\leadsto \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) + \color{blue}{\left(j \cdot \mathsf{fma}\left(c, t, -y \cdot i\right) + j \cdot \mathsf{fma}\left(-y, i, y \cdot i\right)\right)}\]
    8. Using strategy rm
    9. Applied add-cube-cbrt9.5

      \[\leadsto \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) + \left(j \cdot \mathsf{fma}\left(c, t, -y \cdot i\right) + j \cdot \mathsf{fma}\left(-y, i, y \cdot i\right)\right)\]
    10. Applied associate-*r*9.6

      \[\leadsto \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) + \left(j \cdot \mathsf{fma}\left(c, t, -y \cdot i\right) + j \cdot \mathsf{fma}\left(-y, i, y \cdot i\right)\right)\]
  3. Recombined 3 regimes into one program.
  4. Final simplification12.7

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \le -3.3735883346778377 \cdot 10^{-126}:\\ \;\;\;\;\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) + \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}\\ \mathbf{elif}\;x \le 3.288698165822717 \cdot 10^{-124}:\\ \;\;\;\;\left(0 - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;\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) + \left(j \cdot \mathsf{fma}\left(c, t, -y \cdot i\right) + j \cdot \mathsf{fma}\left(-y, i, y \cdot i\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)))))