Average Error: 12.2 → 13.4
Time: 34.5s
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 1.674675193324362264664884066454834412143 \cdot 10^{-289}:\\ \;\;\;\;\mathsf{fma}\left(y \cdot z - t \cdot a, x, \mathsf{fma}\left(b, i \cdot a - c \cdot z, t \cdot \left(j \cdot c\right) + \left(-i \cdot y\right) \cdot j\right)\right)\\ \mathbf{elif}\;x \le 4.679747423961563999718296004311467328545 \cdot 10^{-222}:\\ \;\;\;\;c \cdot \left(t \cdot j - z \cdot b\right) - i \cdot \left(j \cdot y\right)\\ \mathbf{elif}\;x \le 3.577455124027497583398538250065712418291 \cdot 10^{-4}:\\ \;\;\;\;\mathsf{fma}\left(y \cdot z - t \cdot a, x, \mathsf{fma}\left(b, i \cdot a - c \cdot z, t \cdot \left(j \cdot c\right) + \left(-i \cdot y\right) \cdot j\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y \cdot z - t \cdot a, x, \mathsf{fma}\left(b, i \cdot a - c \cdot z, \left(t \cdot c\right) \cdot j + \left(-i \cdot j\right) \cdot y\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 1.674675193324362264664884066454834412143 \cdot 10^{-289}:\\
\;\;\;\;\mathsf{fma}\left(y \cdot z - t \cdot a, x, \mathsf{fma}\left(b, i \cdot a - c \cdot z, t \cdot \left(j \cdot c\right) + \left(-i \cdot y\right) \cdot j\right)\right)\\

\mathbf{elif}\;x \le 4.679747423961563999718296004311467328545 \cdot 10^{-222}:\\
\;\;\;\;c \cdot \left(t \cdot j - z \cdot b\right) - i \cdot \left(j \cdot y\right)\\

\mathbf{elif}\;x \le 3.577455124027497583398538250065712418291 \cdot 10^{-4}:\\
\;\;\;\;\mathsf{fma}\left(y \cdot z - t \cdot a, x, \mathsf{fma}\left(b, i \cdot a - c \cdot z, t \cdot \left(j \cdot c\right) + \left(-i \cdot y\right) \cdot j\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y \cdot z - t \cdot a, x, \mathsf{fma}\left(b, i \cdot a - c \cdot z, \left(t \cdot c\right) \cdot j + \left(-i \cdot j\right) \cdot y\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 r6440811 = x;
        double r6440812 = y;
        double r6440813 = z;
        double r6440814 = r6440812 * r6440813;
        double r6440815 = t;
        double r6440816 = a;
        double r6440817 = r6440815 * r6440816;
        double r6440818 = r6440814 - r6440817;
        double r6440819 = r6440811 * r6440818;
        double r6440820 = b;
        double r6440821 = c;
        double r6440822 = r6440821 * r6440813;
        double r6440823 = i;
        double r6440824 = r6440823 * r6440816;
        double r6440825 = r6440822 - r6440824;
        double r6440826 = r6440820 * r6440825;
        double r6440827 = r6440819 - r6440826;
        double r6440828 = j;
        double r6440829 = r6440821 * r6440815;
        double r6440830 = r6440823 * r6440812;
        double r6440831 = r6440829 - r6440830;
        double r6440832 = r6440828 * r6440831;
        double r6440833 = r6440827 + r6440832;
        return r6440833;
}

double f(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
        double r6440834 = x;
        double r6440835 = 1.6746751933243623e-289;
        bool r6440836 = r6440834 <= r6440835;
        double r6440837 = y;
        double r6440838 = z;
        double r6440839 = r6440837 * r6440838;
        double r6440840 = t;
        double r6440841 = a;
        double r6440842 = r6440840 * r6440841;
        double r6440843 = r6440839 - r6440842;
        double r6440844 = b;
        double r6440845 = i;
        double r6440846 = r6440845 * r6440841;
        double r6440847 = c;
        double r6440848 = r6440847 * r6440838;
        double r6440849 = r6440846 - r6440848;
        double r6440850 = j;
        double r6440851 = r6440850 * r6440847;
        double r6440852 = r6440840 * r6440851;
        double r6440853 = r6440845 * r6440837;
        double r6440854 = -r6440853;
        double r6440855 = r6440854 * r6440850;
        double r6440856 = r6440852 + r6440855;
        double r6440857 = fma(r6440844, r6440849, r6440856);
        double r6440858 = fma(r6440843, r6440834, r6440857);
        double r6440859 = 4.679747423961564e-222;
        bool r6440860 = r6440834 <= r6440859;
        double r6440861 = r6440840 * r6440850;
        double r6440862 = r6440838 * r6440844;
        double r6440863 = r6440861 - r6440862;
        double r6440864 = r6440847 * r6440863;
        double r6440865 = r6440850 * r6440837;
        double r6440866 = r6440845 * r6440865;
        double r6440867 = r6440864 - r6440866;
        double r6440868 = 0.00035774551240274976;
        bool r6440869 = r6440834 <= r6440868;
        double r6440870 = r6440840 * r6440847;
        double r6440871 = r6440870 * r6440850;
        double r6440872 = r6440845 * r6440850;
        double r6440873 = -r6440872;
        double r6440874 = r6440873 * r6440837;
        double r6440875 = r6440871 + r6440874;
        double r6440876 = fma(r6440844, r6440849, r6440875);
        double r6440877 = fma(r6440843, r6440834, r6440876);
        double r6440878 = r6440869 ? r6440858 : r6440877;
        double r6440879 = r6440860 ? r6440867 : r6440878;
        double r6440880 = r6440836 ? r6440858 : r6440879;
        return r6440880;
}

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 < 1.6746751933243623e-289 or 4.679747423961564e-222 < x < 0.00035774551240274976

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y \cdot z - t \cdot a, x, \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-cbrt13.2

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

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

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

      \[\leadsto \mathsf{fma}\left(y \cdot z - t \cdot a, x, \mathsf{fma}\left(b, i \cdot a - c \cdot z, \left(\sqrt[3]{j} \cdot \sqrt[3]{j}\right) \cdot \color{blue}{\left(\left(\sqrt[3]{\sqrt[3]{j}} \cdot \sqrt[3]{\sqrt[3]{j}}\right) \cdot \left(\sqrt[3]{\sqrt[3]{j}} \cdot \left(c \cdot t - i \cdot y\right)\right)\right)}\right)\right)\]
    9. Using strategy rm
    10. Applied sub-neg13.3

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

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

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

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

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

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

    if 1.6746751933243623e-289 < x < 4.679747423961564e-222

    1. Initial program 18.0

      \[\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. Simplified18.0

      \[\leadsto \color{blue}{\mathsf{fma}\left(y \cdot z - t \cdot a, x, \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-cbrt18.4

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

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

      \[\leadsto \color{blue}{t \cdot \left(j \cdot c\right) - \left(z \cdot \left(b \cdot c\right) + i \cdot \left(j \cdot y\right)\right)}\]
    7. Simplified29.6

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

    if 0.00035774551240274976 < x

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y \cdot z - t \cdot a, x, \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-cbrt7.9

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \le 1.674675193324362264664884066454834412143 \cdot 10^{-289}:\\ \;\;\;\;\mathsf{fma}\left(y \cdot z - t \cdot a, x, \mathsf{fma}\left(b, i \cdot a - c \cdot z, t \cdot \left(j \cdot c\right) + \left(-i \cdot y\right) \cdot j\right)\right)\\ \mathbf{elif}\;x \le 4.679747423961563999718296004311467328545 \cdot 10^{-222}:\\ \;\;\;\;c \cdot \left(t \cdot j - z \cdot b\right) - i \cdot \left(j \cdot y\right)\\ \mathbf{elif}\;x \le 3.577455124027497583398538250065712418291 \cdot 10^{-4}:\\ \;\;\;\;\mathsf{fma}\left(y \cdot z - t \cdot a, x, \mathsf{fma}\left(b, i \cdot a - c \cdot z, t \cdot \left(j \cdot c\right) + \left(-i \cdot y\right) \cdot j\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y \cdot z - t \cdot a, x, \mathsf{fma}\left(b, i \cdot a - c \cdot z, \left(t \cdot c\right) \cdot j + \left(-i \cdot j\right) \cdot y\right)\right)\\ \end{array}\]

Reproduce

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