Average Error: 11.1 → 11.6
Time: 28.9s
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}\;b \le -6.486872471409811 \cdot 10^{-131}:\\ \;\;\;\;\left(\left(\left(y \cdot z\right) \cdot x + \left(-x\right) \cdot \left(a \cdot t\right)\right) - b \cdot \left(c \cdot z - a \cdot i\right)\right) + \left(j \cdot \left(c \cdot t - y \cdot i\right) + \mathsf{fma}\left(-y, i, y \cdot i\right) \cdot j\right)\\ \mathbf{elif}\;b \le 2.0712726126325024 \cdot 10^{-249}:\\ \;\;\;\;j \cdot \left(c \cdot t - y \cdot i\right) + \left(\left(y \cdot z\right) \cdot x + \left(-x\right) \cdot \left(a \cdot t\right)\right)\\ \mathbf{else}:\\ \;\;\;\;j \cdot \left(c \cdot t - y \cdot i\right) + \left(\left(\left(-x\right) \cdot \left(a \cdot t\right) + \left(x \cdot z\right) \cdot y\right) - b \cdot \left(c \cdot z - a \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}\;b \le -6.486872471409811 \cdot 10^{-131}:\\
\;\;\;\;\left(\left(\left(y \cdot z\right) \cdot x + \left(-x\right) \cdot \left(a \cdot t\right)\right) - b \cdot \left(c \cdot z - a \cdot i\right)\right) + \left(j \cdot \left(c \cdot t - y \cdot i\right) + \mathsf{fma}\left(-y, i, y \cdot i\right) \cdot j\right)\\

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

\mathbf{else}:\\
\;\;\;\;j \cdot \left(c \cdot t - y \cdot i\right) + \left(\left(\left(-x\right) \cdot \left(a \cdot t\right) + \left(x \cdot z\right) \cdot y\right) - b \cdot \left(c \cdot z - a \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 r3150991 = x;
        double r3150992 = y;
        double r3150993 = z;
        double r3150994 = r3150992 * r3150993;
        double r3150995 = t;
        double r3150996 = a;
        double r3150997 = r3150995 * r3150996;
        double r3150998 = r3150994 - r3150997;
        double r3150999 = r3150991 * r3150998;
        double r3151000 = b;
        double r3151001 = c;
        double r3151002 = r3151001 * r3150993;
        double r3151003 = i;
        double r3151004 = r3151003 * r3150996;
        double r3151005 = r3151002 - r3151004;
        double r3151006 = r3151000 * r3151005;
        double r3151007 = r3150999 - r3151006;
        double r3151008 = j;
        double r3151009 = r3151001 * r3150995;
        double r3151010 = r3151003 * r3150992;
        double r3151011 = r3151009 - r3151010;
        double r3151012 = r3151008 * r3151011;
        double r3151013 = r3151007 + r3151012;
        return r3151013;
}

double f(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
        double r3151014 = b;
        double r3151015 = -6.486872471409811e-131;
        bool r3151016 = r3151014 <= r3151015;
        double r3151017 = y;
        double r3151018 = z;
        double r3151019 = r3151017 * r3151018;
        double r3151020 = x;
        double r3151021 = r3151019 * r3151020;
        double r3151022 = -r3151020;
        double r3151023 = a;
        double r3151024 = t;
        double r3151025 = r3151023 * r3151024;
        double r3151026 = r3151022 * r3151025;
        double r3151027 = r3151021 + r3151026;
        double r3151028 = c;
        double r3151029 = r3151028 * r3151018;
        double r3151030 = i;
        double r3151031 = r3151023 * r3151030;
        double r3151032 = r3151029 - r3151031;
        double r3151033 = r3151014 * r3151032;
        double r3151034 = r3151027 - r3151033;
        double r3151035 = j;
        double r3151036 = r3151028 * r3151024;
        double r3151037 = r3151017 * r3151030;
        double r3151038 = r3151036 - r3151037;
        double r3151039 = r3151035 * r3151038;
        double r3151040 = -r3151017;
        double r3151041 = fma(r3151040, r3151030, r3151037);
        double r3151042 = r3151041 * r3151035;
        double r3151043 = r3151039 + r3151042;
        double r3151044 = r3151034 + r3151043;
        double r3151045 = 2.0712726126325024e-249;
        bool r3151046 = r3151014 <= r3151045;
        double r3151047 = r3151039 + r3151027;
        double r3151048 = r3151020 * r3151018;
        double r3151049 = r3151048 * r3151017;
        double r3151050 = r3151026 + r3151049;
        double r3151051 = r3151050 - r3151033;
        double r3151052 = r3151039 + r3151051;
        double r3151053 = r3151046 ? r3151047 : r3151052;
        double r3151054 = r3151016 ? r3151044 : r3151053;
        return r3151054;
}

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 b < -6.486872471409811e-131

    1. Initial program 8.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. Using strategy rm
    3. Applied sub-neg8.2

      \[\leadsto \left(x \cdot \color{blue}{\left(y \cdot z + \left(-t \cdot a\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-rgt-in8.2

      \[\leadsto \left(\color{blue}{\left(\left(y \cdot z\right) \cdot x + \left(-t \cdot a\right) \cdot x\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-diff8.2

      \[\leadsto \left(\left(\left(y \cdot z\right) \cdot x + \left(-t \cdot a\right) \cdot x\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-in8.2

      \[\leadsto \left(\left(\left(y \cdot z\right) \cdot x + \left(-t \cdot a\right) \cdot x\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. Simplified8.2

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

    if -6.486872471409811e-131 < b < 2.0712726126325024e-249

    1. Initial program 16.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. Using strategy rm
    3. Applied sub-neg16.0

      \[\leadsto \left(x \cdot \color{blue}{\left(y \cdot z + \left(-t \cdot a\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-rgt-in16.0

      \[\leadsto \left(\color{blue}{\left(\left(y \cdot z\right) \cdot x + \left(-t \cdot a\right) \cdot x\right)} - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right)\]
    5. Taylor expanded around 0 17.7

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

    if 2.0712726126325024e-249 < b

    1. Initial program 10.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. Using strategy rm
    3. Applied sub-neg10.4

      \[\leadsto \left(x \cdot \color{blue}{\left(y \cdot z + \left(-t \cdot a\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-rgt-in10.4

      \[\leadsto \left(\color{blue}{\left(\left(y \cdot z\right) \cdot x + \left(-t \cdot a\right) \cdot x\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 associate-*l*10.7

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

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

Reproduce

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