Average Error: 11.5 → 9.0
Time: 30.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 -9.562565391962512 \cdot 10^{-68}:\\ \;\;\;\;\left(j \cdot \mathsf{fma}\left(-y, i, i \cdot y\right) + j \cdot \left(c \cdot t - i \cdot y\right)\right) + \left(\left(y \cdot z - a \cdot t\right) \cdot x - b \cdot \left(z \cdot c - i \cdot a\right)\right)\\ \mathbf{elif}\;x \le 1657435.9979234417:\\ \;\;\;\;j \cdot \left(c \cdot t - i \cdot y\right) + \left(\left(\left(-a\right) \cdot \left(x \cdot t\right) + z \cdot \left(y \cdot x\right)\right) - \left(b \cdot \mathsf{fma}\left(-a, i, i \cdot a\right) + b \cdot \mathsf{fma}\left(c, z, \left(-a\right) \cdot i\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(j \cdot \mathsf{fma}\left(-y, i, i \cdot y\right) + j \cdot \left(c \cdot t - i \cdot y\right)\right) + \left(\left(y \cdot z - a \cdot t\right) \cdot x - b \cdot \left(z \cdot c - i \cdot a\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 -9.562565391962512 \cdot 10^{-68}:\\
\;\;\;\;\left(j \cdot \mathsf{fma}\left(-y, i, i \cdot y\right) + j \cdot \left(c \cdot t - i \cdot y\right)\right) + \left(\left(y \cdot z - a \cdot t\right) \cdot x - b \cdot \left(z \cdot c - i \cdot a\right)\right)\\

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

\mathbf{else}:\\
\;\;\;\;\left(j \cdot \mathsf{fma}\left(-y, i, i \cdot y\right) + j \cdot \left(c \cdot t - i \cdot y\right)\right) + \left(\left(y \cdot z - a \cdot t\right) \cdot x - b \cdot \left(z \cdot c - i \cdot a\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 r2784123 = x;
        double r2784124 = y;
        double r2784125 = z;
        double r2784126 = r2784124 * r2784125;
        double r2784127 = t;
        double r2784128 = a;
        double r2784129 = r2784127 * r2784128;
        double r2784130 = r2784126 - r2784129;
        double r2784131 = r2784123 * r2784130;
        double r2784132 = b;
        double r2784133 = c;
        double r2784134 = r2784133 * r2784125;
        double r2784135 = i;
        double r2784136 = r2784135 * r2784128;
        double r2784137 = r2784134 - r2784136;
        double r2784138 = r2784132 * r2784137;
        double r2784139 = r2784131 - r2784138;
        double r2784140 = j;
        double r2784141 = r2784133 * r2784127;
        double r2784142 = r2784135 * r2784124;
        double r2784143 = r2784141 - r2784142;
        double r2784144 = r2784140 * r2784143;
        double r2784145 = r2784139 + r2784144;
        return r2784145;
}

double f(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
        double r2784146 = x;
        double r2784147 = -9.562565391962512e-68;
        bool r2784148 = r2784146 <= r2784147;
        double r2784149 = j;
        double r2784150 = y;
        double r2784151 = -r2784150;
        double r2784152 = i;
        double r2784153 = r2784152 * r2784150;
        double r2784154 = fma(r2784151, r2784152, r2784153);
        double r2784155 = r2784149 * r2784154;
        double r2784156 = c;
        double r2784157 = t;
        double r2784158 = r2784156 * r2784157;
        double r2784159 = r2784158 - r2784153;
        double r2784160 = r2784149 * r2784159;
        double r2784161 = r2784155 + r2784160;
        double r2784162 = z;
        double r2784163 = r2784150 * r2784162;
        double r2784164 = a;
        double r2784165 = r2784164 * r2784157;
        double r2784166 = r2784163 - r2784165;
        double r2784167 = r2784166 * r2784146;
        double r2784168 = b;
        double r2784169 = r2784162 * r2784156;
        double r2784170 = r2784152 * r2784164;
        double r2784171 = r2784169 - r2784170;
        double r2784172 = r2784168 * r2784171;
        double r2784173 = r2784167 - r2784172;
        double r2784174 = r2784161 + r2784173;
        double r2784175 = 1657435.9979234417;
        bool r2784176 = r2784146 <= r2784175;
        double r2784177 = -r2784164;
        double r2784178 = r2784146 * r2784157;
        double r2784179 = r2784177 * r2784178;
        double r2784180 = r2784150 * r2784146;
        double r2784181 = r2784162 * r2784180;
        double r2784182 = r2784179 + r2784181;
        double r2784183 = fma(r2784177, r2784152, r2784170);
        double r2784184 = r2784168 * r2784183;
        double r2784185 = r2784177 * r2784152;
        double r2784186 = fma(r2784156, r2784162, r2784185);
        double r2784187 = r2784168 * r2784186;
        double r2784188 = r2784184 + r2784187;
        double r2784189 = r2784182 - r2784188;
        double r2784190 = r2784160 + r2784189;
        double r2784191 = r2784176 ? r2784190 : r2784174;
        double r2784192 = r2784148 ? r2784174 : r2784191;
        return r2784192;
}

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 x < -9.562565391962512e-68 or 1657435.9979234417 < x

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

      \[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\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)}\]
    4. Applied distribute-lft-in8.0

      \[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\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)}\]
    5. Simplified8.0

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

    if -9.562565391962512e-68 < x < 1657435.9979234417

    1. Initial program 14.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 prod-diff14.4

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

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

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

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

      \[\leadsto \left(\left(x \cdot \left(y \cdot z\right) + \color{blue}{t \cdot \left(x \cdot \left(-a\right)\right)}\right) - \left(\mathsf{fma}\left(c, z, -a \cdot i\right) \cdot b + \mathsf{fma}\left(-a, i, a \cdot i\right) \cdot b\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right)\]
    9. Using strategy rm
    10. Applied associate-*r*12.0

      \[\leadsto \left(\left(x \cdot \left(y \cdot z\right) + \color{blue}{\left(t \cdot x\right) \cdot \left(-a\right)}\right) - \left(\mathsf{fma}\left(c, z, -a \cdot i\right) \cdot b + \mathsf{fma}\left(-a, i, a \cdot i\right) \cdot b\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right)\]
    11. Using strategy rm
    12. Applied associate-*r*9.8

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

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

Reproduce

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