Average Error: 12.1 → 12.4
Time: 8.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}\;j \le -1.4382108476743071 \cdot 10^{-181}:\\ \;\;\;\;\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(c \cdot z\right) + \left(-a \cdot \left(i \cdot b\right)\right)\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right)\\ \mathbf{elif}\;j \le 8.63059918010717081 \cdot 10^{-207}:\\ \;\;\;\;\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(c \cdot z\right) + b \cdot \left(-i \cdot a\right)\right)\right) + 0\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot \left(y \cdot z - t \cdot a\right) - \left(b \cdot \left(c \cdot z\right) + b \cdot \left(-i \cdot a\right)\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)\\ \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}\;j \le -1.4382108476743071 \cdot 10^{-181}:\\
\;\;\;\;\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(c \cdot z\right) + \left(-a \cdot \left(i \cdot b\right)\right)\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right)\\

\mathbf{elif}\;j \le 8.63059918010717081 \cdot 10^{-207}:\\
\;\;\;\;\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(c \cdot z\right) + b \cdot \left(-i \cdot a\right)\right)\right) + 0\\

\mathbf{else}:\\
\;\;\;\;\left(x \cdot \left(y \cdot z - t \cdot a\right) - \left(b \cdot \left(c \cdot z\right) + b \cdot \left(-i \cdot a\right)\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)\\

\end{array}
double f(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
        double r85114 = x;
        double r85115 = y;
        double r85116 = z;
        double r85117 = r85115 * r85116;
        double r85118 = t;
        double r85119 = a;
        double r85120 = r85118 * r85119;
        double r85121 = r85117 - r85120;
        double r85122 = r85114 * r85121;
        double r85123 = b;
        double r85124 = c;
        double r85125 = r85124 * r85116;
        double r85126 = i;
        double r85127 = r85126 * r85119;
        double r85128 = r85125 - r85127;
        double r85129 = r85123 * r85128;
        double r85130 = r85122 - r85129;
        double r85131 = j;
        double r85132 = r85124 * r85118;
        double r85133 = r85126 * r85115;
        double r85134 = r85132 - r85133;
        double r85135 = r85131 * r85134;
        double r85136 = r85130 + r85135;
        return r85136;
}

double f(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
        double r85137 = j;
        double r85138 = -1.438210847674307e-181;
        bool r85139 = r85137 <= r85138;
        double r85140 = x;
        double r85141 = y;
        double r85142 = z;
        double r85143 = a;
        double r85144 = t;
        double r85145 = r85143 * r85144;
        double r85146 = -r85145;
        double r85147 = fma(r85141, r85142, r85146);
        double r85148 = r85140 * r85147;
        double r85149 = -r85143;
        double r85150 = fma(r85149, r85144, r85145);
        double r85151 = r85140 * r85150;
        double r85152 = r85148 + r85151;
        double r85153 = b;
        double r85154 = c;
        double r85155 = r85154 * r85142;
        double r85156 = r85153 * r85155;
        double r85157 = i;
        double r85158 = r85157 * r85153;
        double r85159 = r85143 * r85158;
        double r85160 = -r85159;
        double r85161 = r85156 + r85160;
        double r85162 = r85152 - r85161;
        double r85163 = r85154 * r85144;
        double r85164 = r85157 * r85141;
        double r85165 = r85163 - r85164;
        double r85166 = r85137 * r85165;
        double r85167 = r85162 + r85166;
        double r85168 = 8.630599180107171e-207;
        bool r85169 = r85137 <= r85168;
        double r85170 = r85157 * r85143;
        double r85171 = -r85170;
        double r85172 = r85153 * r85171;
        double r85173 = r85156 + r85172;
        double r85174 = r85152 - r85173;
        double r85175 = 0.0;
        double r85176 = r85174 + r85175;
        double r85177 = r85141 * r85142;
        double r85178 = r85144 * r85143;
        double r85179 = r85177 - r85178;
        double r85180 = r85140 * r85179;
        double r85181 = r85180 - r85173;
        double r85182 = r85141 * r85157;
        double r85183 = -r85182;
        double r85184 = fma(r85154, r85144, r85183);
        double r85185 = r85137 * r85184;
        double r85186 = -r85141;
        double r85187 = fma(r85186, r85157, r85182);
        double r85188 = r85137 * r85187;
        double r85189 = r85185 + r85188;
        double r85190 = r85181 + r85189;
        double r85191 = r85169 ? r85176 : r85190;
        double r85192 = r85139 ? r85167 : r85191;
        return r85192;
}

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 j < -1.438210847674307e-181

    1. Initial program 10.1

      \[\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.1

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

      \[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\right) - \color{blue}{\left(b \cdot \left(c \cdot z\right) + b \cdot \left(-i \cdot a\right)\right)}\right) + j \cdot \left(c \cdot t - i \cdot y\right)\]
    5. Using strategy rm
    6. Applied prod-diff10.1

      \[\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)} - \left(b \cdot \left(c \cdot z\right) + b \cdot \left(-i \cdot a\right)\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right)\]
    7. Applied distribute-lft-in10.1

      \[\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)} - \left(b \cdot \left(c \cdot z\right) + b \cdot \left(-i \cdot a\right)\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right)\]
    8. Using strategy rm
    9. Applied distribute-rgt-neg-out10.1

      \[\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) - \left(b \cdot \left(c \cdot z\right) + \color{blue}{\left(-b \cdot \left(i \cdot a\right)\right)}\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right)\]
    10. Simplified10.9

      \[\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) - \left(b \cdot \left(c \cdot z\right) + \left(-\color{blue}{a \cdot \left(i \cdot b\right)}\right)\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right)\]

    if -1.438210847674307e-181 < j < 8.630599180107171e-207

    1. Initial program 18.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. Using strategy rm
    3. Applied sub-neg18.7

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

      \[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\right) - \color{blue}{\left(b \cdot \left(c \cdot z\right) + b \cdot \left(-i \cdot a\right)\right)}\right) + j \cdot \left(c \cdot t - i \cdot y\right)\]
    5. Using strategy rm
    6. Applied prod-diff18.7

      \[\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)} - \left(b \cdot \left(c \cdot z\right) + b \cdot \left(-i \cdot a\right)\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right)\]
    7. Applied distribute-lft-in18.7

      \[\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)} - \left(b \cdot \left(c \cdot z\right) + b \cdot \left(-i \cdot a\right)\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right)\]
    8. Taylor expanded around 0 18.9

      \[\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) - \left(b \cdot \left(c \cdot z\right) + b \cdot \left(-i \cdot a\right)\right)\right) + \color{blue}{0}\]

    if 8.630599180107171e-207 < j

    1. Initial program 9.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 sub-neg9.9

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

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

      \[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\right) - \left(b \cdot \left(c \cdot z\right) + b \cdot \left(-i \cdot a\right)\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.9

      \[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\right) - \left(b \cdot \left(c \cdot z\right) + b \cdot \left(-i \cdot a\right)\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)}\]
  3. Recombined 3 regimes into one program.
  4. Final simplification12.4

    \[\leadsto \begin{array}{l} \mathbf{if}\;j \le -1.4382108476743071 \cdot 10^{-181}:\\ \;\;\;\;\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(c \cdot z\right) + \left(-a \cdot \left(i \cdot b\right)\right)\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right)\\ \mathbf{elif}\;j \le 8.63059918010717081 \cdot 10^{-207}:\\ \;\;\;\;\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(c \cdot z\right) + b \cdot \left(-i \cdot a\right)\right)\right) + 0\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot \left(y \cdot z - t \cdot a\right) - \left(b \cdot \left(c \cdot z\right) + b \cdot \left(-i \cdot a\right)\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)\\ \end{array}\]

Reproduce

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