Average Error: 11.3 → 9.7
Time: 39.8s
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 -7.298628031951923 \cdot 10^{+186}:\\ \;\;\;\;\mathsf{fma}\left(t \cdot c - y \cdot i, j, \left(x \cdot y - c \cdot b\right) \cdot z - a \cdot \left(t \cdot x\right)\right)\\ \mathbf{elif}\;z \le 6.04397839743604 \cdot 10^{+181}:\\ \;\;\;\;\mathsf{fma}\left(t \cdot c - y \cdot i, j, \mathsf{fma}\left(a \cdot i - c \cdot z, b, \mathsf{fma}\left(y, z, t \cdot \left(-a\right)\right) \cdot x + x \cdot \mathsf{fma}\left(-a, t, t \cdot a\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(t \cdot c - y \cdot i, j, \left(x \cdot y - c \cdot b\right) \cdot z - a \cdot \left(t \cdot x\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 -7.298628031951923 \cdot 10^{+186}:\\
\;\;\;\;\mathsf{fma}\left(t \cdot c - y \cdot i, j, \left(x \cdot y - c \cdot b\right) \cdot z - a \cdot \left(t \cdot x\right)\right)\\

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

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t \cdot c - y \cdot i, j, \left(x \cdot y - c \cdot b\right) \cdot z - a \cdot \left(t \cdot x\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 r4648771 = x;
        double r4648772 = y;
        double r4648773 = z;
        double r4648774 = r4648772 * r4648773;
        double r4648775 = t;
        double r4648776 = a;
        double r4648777 = r4648775 * r4648776;
        double r4648778 = r4648774 - r4648777;
        double r4648779 = r4648771 * r4648778;
        double r4648780 = b;
        double r4648781 = c;
        double r4648782 = r4648781 * r4648773;
        double r4648783 = i;
        double r4648784 = r4648783 * r4648776;
        double r4648785 = r4648782 - r4648784;
        double r4648786 = r4648780 * r4648785;
        double r4648787 = r4648779 - r4648786;
        double r4648788 = j;
        double r4648789 = r4648781 * r4648775;
        double r4648790 = r4648783 * r4648772;
        double r4648791 = r4648789 - r4648790;
        double r4648792 = r4648788 * r4648791;
        double r4648793 = r4648787 + r4648792;
        return r4648793;
}

double f(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
        double r4648794 = z;
        double r4648795 = -7.298628031951923e+186;
        bool r4648796 = r4648794 <= r4648795;
        double r4648797 = t;
        double r4648798 = c;
        double r4648799 = r4648797 * r4648798;
        double r4648800 = y;
        double r4648801 = i;
        double r4648802 = r4648800 * r4648801;
        double r4648803 = r4648799 - r4648802;
        double r4648804 = j;
        double r4648805 = x;
        double r4648806 = r4648805 * r4648800;
        double r4648807 = b;
        double r4648808 = r4648798 * r4648807;
        double r4648809 = r4648806 - r4648808;
        double r4648810 = r4648809 * r4648794;
        double r4648811 = a;
        double r4648812 = r4648797 * r4648805;
        double r4648813 = r4648811 * r4648812;
        double r4648814 = r4648810 - r4648813;
        double r4648815 = fma(r4648803, r4648804, r4648814);
        double r4648816 = 6.04397839743604e+181;
        bool r4648817 = r4648794 <= r4648816;
        double r4648818 = r4648811 * r4648801;
        double r4648819 = r4648798 * r4648794;
        double r4648820 = r4648818 - r4648819;
        double r4648821 = -r4648811;
        double r4648822 = r4648797 * r4648821;
        double r4648823 = fma(r4648800, r4648794, r4648822);
        double r4648824 = r4648823 * r4648805;
        double r4648825 = r4648797 * r4648811;
        double r4648826 = fma(r4648821, r4648797, r4648825);
        double r4648827 = r4648805 * r4648826;
        double r4648828 = r4648824 + r4648827;
        double r4648829 = fma(r4648820, r4648807, r4648828);
        double r4648830 = fma(r4648803, r4648804, r4648829);
        double r4648831 = r4648817 ? r4648830 : r4648815;
        double r4648832 = r4648796 ? r4648815 : r4648831;
        return r4648832;
}

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 < -7.298628031951923e+186 or 6.04397839743604e+181 < z

    1. Initial program 22.4

      \[\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. Simplified22.4

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

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

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

      \[\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)\]
    6. Simplified9.2

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

    if -7.298628031951923e+186 < z < 6.04397839743604e+181

    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. Simplified9.8

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \le -7.298628031951923 \cdot 10^{+186}:\\ \;\;\;\;\mathsf{fma}\left(t \cdot c - y \cdot i, j, \left(x \cdot y - c \cdot b\right) \cdot z - a \cdot \left(t \cdot x\right)\right)\\ \mathbf{elif}\;z \le 6.04397839743604 \cdot 10^{+181}:\\ \;\;\;\;\mathsf{fma}\left(t \cdot c - y \cdot i, j, \mathsf{fma}\left(a \cdot i - c \cdot z, b, \mathsf{fma}\left(y, z, t \cdot \left(-a\right)\right) \cdot x + x \cdot \mathsf{fma}\left(-a, t, t \cdot a\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(t \cdot c - y \cdot i, j, \left(x \cdot y - c \cdot b\right) \cdot z - a \cdot \left(t \cdot x\right)\right)\\ \end{array}\]

Reproduce

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