Average Error: 12.0 → 12.1
Time: 33.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}\;z \le 9.242667919964829558492511784649235589271 \cdot 10^{144}:\\ \;\;\;\;\mathsf{fma}\left(t \cdot c - y \cdot i, j, \mathsf{fma}\left(a \cdot i - c \cdot z, b, \left(\sqrt[3]{y \cdot z - t \cdot a} \cdot \left(\sqrt[3]{y \cdot z - t \cdot a} \cdot \sqrt[3]{y \cdot z - t \cdot a}\right)\right) \cdot x\right)\right)\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(x \cdot y - c \cdot b\right) - \left(t \cdot a\right) \cdot x\\ \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 9.242667919964829558492511784649235589271 \cdot 10^{144}:\\
\;\;\;\;\mathsf{fma}\left(t \cdot c - y \cdot i, j, \mathsf{fma}\left(a \cdot i - c \cdot z, b, \left(\sqrt[3]{y \cdot z - t \cdot a} \cdot \left(\sqrt[3]{y \cdot z - t \cdot a} \cdot \sqrt[3]{y \cdot z - t \cdot a}\right)\right) \cdot x\right)\right)\\

\mathbf{else}:\\
\;\;\;\;z \cdot \left(x \cdot y - c \cdot b\right) - \left(t \cdot a\right) \cdot x\\

\end{array}
double f(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
        double r4527158 = x;
        double r4527159 = y;
        double r4527160 = z;
        double r4527161 = r4527159 * r4527160;
        double r4527162 = t;
        double r4527163 = a;
        double r4527164 = r4527162 * r4527163;
        double r4527165 = r4527161 - r4527164;
        double r4527166 = r4527158 * r4527165;
        double r4527167 = b;
        double r4527168 = c;
        double r4527169 = r4527168 * r4527160;
        double r4527170 = i;
        double r4527171 = r4527170 * r4527163;
        double r4527172 = r4527169 - r4527171;
        double r4527173 = r4527167 * r4527172;
        double r4527174 = r4527166 - r4527173;
        double r4527175 = j;
        double r4527176 = r4527168 * r4527162;
        double r4527177 = r4527170 * r4527159;
        double r4527178 = r4527176 - r4527177;
        double r4527179 = r4527175 * r4527178;
        double r4527180 = r4527174 + r4527179;
        return r4527180;
}

double f(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
        double r4527181 = z;
        double r4527182 = 9.24266791996483e+144;
        bool r4527183 = r4527181 <= r4527182;
        double r4527184 = t;
        double r4527185 = c;
        double r4527186 = r4527184 * r4527185;
        double r4527187 = y;
        double r4527188 = i;
        double r4527189 = r4527187 * r4527188;
        double r4527190 = r4527186 - r4527189;
        double r4527191 = j;
        double r4527192 = a;
        double r4527193 = r4527192 * r4527188;
        double r4527194 = r4527185 * r4527181;
        double r4527195 = r4527193 - r4527194;
        double r4527196 = b;
        double r4527197 = r4527187 * r4527181;
        double r4527198 = r4527184 * r4527192;
        double r4527199 = r4527197 - r4527198;
        double r4527200 = cbrt(r4527199);
        double r4527201 = r4527200 * r4527200;
        double r4527202 = r4527200 * r4527201;
        double r4527203 = x;
        double r4527204 = r4527202 * r4527203;
        double r4527205 = fma(r4527195, r4527196, r4527204);
        double r4527206 = fma(r4527190, r4527191, r4527205);
        double r4527207 = r4527203 * r4527187;
        double r4527208 = r4527185 * r4527196;
        double r4527209 = r4527207 - r4527208;
        double r4527210 = r4527181 * r4527209;
        double r4527211 = r4527198 * r4527203;
        double r4527212 = r4527210 - r4527211;
        double r4527213 = r4527183 ? r4527206 : r4527212;
        return r4527213;
}

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 < 9.24266791996483e+144

    1. Initial program 10.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. Simplified10.9

      \[\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. Using strategy rm
    4. Applied add-cube-cbrt11.2

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

    if 9.24266791996483e+144 < z

    1. Initial program 23.3

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

      \[\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 28.7

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

      \[\leadsto \color{blue}{z \cdot \left(y \cdot x - c \cdot b\right) - x \cdot \left(t \cdot a\right)}\]
  3. Recombined 2 regimes into one program.
  4. Final simplification12.1

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

Reproduce

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