Average Error: 12.4 → 14.3
Time: 11.3s
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 -3.13021924517858906 \cdot 10^{149} \lor \neg \left(z \le 3.5058906695120028 \cdot 10^{174}\right):\\ \;\;\;\;\mathsf{fma}\left(a, i \cdot b, -\mathsf{fma}\left(z, b \cdot c, a \cdot \left(x \cdot t\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(c \cdot t - i \cdot y, j, \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(\left(b \cdot \left(\sqrt[3]{z \cdot c - a \cdot i} \cdot \sqrt[3]{z \cdot c - a \cdot i}\right)\right) \cdot \sqrt[3]{z \cdot c - a \cdot i} + b \cdot \mathsf{fma}\left(-a, i, a \cdot i\right)\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 -3.13021924517858906 \cdot 10^{149} \lor \neg \left(z \le 3.5058906695120028 \cdot 10^{174}\right):\\
\;\;\;\;\mathsf{fma}\left(a, i \cdot b, -\mathsf{fma}\left(z, b \cdot c, a \cdot \left(x \cdot t\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(c \cdot t - i \cdot y, j, \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(\left(b \cdot \left(\sqrt[3]{z \cdot c - a \cdot i} \cdot \sqrt[3]{z \cdot c - a \cdot i}\right)\right) \cdot \sqrt[3]{z \cdot c - a \cdot i} + b \cdot \mathsf{fma}\left(-a, i, a \cdot i\right)\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 r131124 = x;
        double r131125 = y;
        double r131126 = z;
        double r131127 = r131125 * r131126;
        double r131128 = t;
        double r131129 = a;
        double r131130 = r131128 * r131129;
        double r131131 = r131127 - r131130;
        double r131132 = r131124 * r131131;
        double r131133 = b;
        double r131134 = c;
        double r131135 = r131134 * r131126;
        double r131136 = i;
        double r131137 = r131136 * r131129;
        double r131138 = r131135 - r131137;
        double r131139 = r131133 * r131138;
        double r131140 = r131132 - r131139;
        double r131141 = j;
        double r131142 = r131134 * r131128;
        double r131143 = r131136 * r131125;
        double r131144 = r131142 - r131143;
        double r131145 = r131141 * r131144;
        double r131146 = r131140 + r131145;
        return r131146;
}

double f(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
        double r131147 = z;
        double r131148 = -3.130219245178589e+149;
        bool r131149 = r131147 <= r131148;
        double r131150 = 3.505890669512003e+174;
        bool r131151 = r131147 <= r131150;
        double r131152 = !r131151;
        bool r131153 = r131149 || r131152;
        double r131154 = a;
        double r131155 = i;
        double r131156 = b;
        double r131157 = r131155 * r131156;
        double r131158 = c;
        double r131159 = r131156 * r131158;
        double r131160 = x;
        double r131161 = t;
        double r131162 = r131160 * r131161;
        double r131163 = r131154 * r131162;
        double r131164 = fma(r131147, r131159, r131163);
        double r131165 = -r131164;
        double r131166 = fma(r131154, r131157, r131165);
        double r131167 = r131158 * r131161;
        double r131168 = y;
        double r131169 = r131155 * r131168;
        double r131170 = r131167 - r131169;
        double r131171 = j;
        double r131172 = r131154 * r131161;
        double r131173 = -r131172;
        double r131174 = fma(r131168, r131147, r131173);
        double r131175 = r131160 * r131174;
        double r131176 = -r131154;
        double r131177 = fma(r131176, r131161, r131172);
        double r131178 = r131160 * r131177;
        double r131179 = r131175 + r131178;
        double r131180 = r131147 * r131158;
        double r131181 = r131154 * r131155;
        double r131182 = r131180 - r131181;
        double r131183 = cbrt(r131182);
        double r131184 = r131183 * r131183;
        double r131185 = r131156 * r131184;
        double r131186 = r131185 * r131183;
        double r131187 = fma(r131176, r131155, r131181);
        double r131188 = r131156 * r131187;
        double r131189 = r131186 + r131188;
        double r131190 = r131179 - r131189;
        double r131191 = fma(r131170, r131171, r131190);
        double r131192 = r131153 ? r131166 : r131191;
        return r131192;
}

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 < -3.130219245178589e+149 or 3.505890669512003e+174 < z

    1. Initial program 23.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. Simplified23.0

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

      \[\leadsto \color{blue}{a \cdot \left(i \cdot b\right) - \left(z \cdot \left(b \cdot c\right) + a \cdot \left(x \cdot t\right)\right)}\]
    4. Simplified34.4

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

    if -3.130219245178589e+149 < z < 3.505890669512003e+174

    1. Initial program 10.6

      \[\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. Simplified10.6

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

      \[\leadsto \mathsf{fma}\left(c \cdot t - i \cdot y, j, 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)\]
    5. Applied distribute-lft-in10.6

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

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

      \[\leadsto \mathsf{fma}\left(c \cdot t - i \cdot y, j, 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(z \cdot c - a \cdot i\right) + b \cdot \mathsf{fma}\left(-a, i, a \cdot i\right)\right)\right)\]
    9. Applied distribute-lft-in10.6

      \[\leadsto \mathsf{fma}\left(c \cdot t - i \cdot y, j, \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(z \cdot c - a \cdot i\right) + b \cdot \mathsf{fma}\left(-a, i, a \cdot i\right)\right)\right)\]
    10. Using strategy rm
    11. Applied add-cube-cbrt10.9

      \[\leadsto \mathsf{fma}\left(c \cdot t - i \cdot y, j, \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 \color{blue}{\left(\left(\sqrt[3]{z \cdot c - a \cdot i} \cdot \sqrt[3]{z \cdot c - a \cdot i}\right) \cdot \sqrt[3]{z \cdot c - a \cdot i}\right)} + b \cdot \mathsf{fma}\left(-a, i, a \cdot i\right)\right)\right)\]
    12. Applied associate-*r*10.9

      \[\leadsto \mathsf{fma}\left(c \cdot t - i \cdot y, j, \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(\color{blue}{\left(b \cdot \left(\sqrt[3]{z \cdot c - a \cdot i} \cdot \sqrt[3]{z \cdot c - a \cdot i}\right)\right) \cdot \sqrt[3]{z \cdot c - a \cdot i}} + b \cdot \mathsf{fma}\left(-a, i, a \cdot i\right)\right)\right)\]
  3. Recombined 2 regimes into one program.
  4. Final simplification14.3

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \le -3.13021924517858906 \cdot 10^{149} \lor \neg \left(z \le 3.5058906695120028 \cdot 10^{174}\right):\\ \;\;\;\;\mathsf{fma}\left(a, i \cdot b, -\mathsf{fma}\left(z, b \cdot c, a \cdot \left(x \cdot t\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(c \cdot t - i \cdot y, j, \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(\left(b \cdot \left(\sqrt[3]{z \cdot c - a \cdot i} \cdot \sqrt[3]{z \cdot c - a \cdot i}\right)\right) \cdot \sqrt[3]{z \cdot c - a \cdot i} + b \cdot \mathsf{fma}\left(-a, i, a \cdot i\right)\right)\right)\\ \end{array}\]

Reproduce

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