Average Error: 12.8 → 11.8
Time: 1.4m
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 -1.327033599359954 \cdot 10^{+156}:\\ \;\;\;\;\mathsf{fma}\left(t \cdot c - y \cdot i, j, \left(x \cdot y - c \cdot b\right) \cdot z - \left(t \cdot x\right) \cdot a\right)\\ \mathbf{elif}\;z \le 1.2230243741272296 \cdot 10^{-48}:\\ \;\;\;\;\mathsf{fma}\left(t \cdot c - y \cdot i, j, \mathsf{fma}\left(i \cdot a - c \cdot z, b, \left(\left(y \cdot z - t \cdot a\right) \cdot \left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right)\right) \cdot \sqrt[3]{x}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(t \cdot c - y \cdot i, j, \left(x \cdot y - c \cdot b\right) \cdot z - \left(t \cdot x\right) \cdot a\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 -1.327033599359954 \cdot 10^{+156}:\\
\;\;\;\;\mathsf{fma}\left(t \cdot c - y \cdot i, j, \left(x \cdot y - c \cdot b\right) \cdot z - \left(t \cdot x\right) \cdot a\right)\\

\mathbf{elif}\;z \le 1.2230243741272296 \cdot 10^{-48}:\\
\;\;\;\;\mathsf{fma}\left(t \cdot c - y \cdot i, j, \mathsf{fma}\left(i \cdot a - c \cdot z, b, \left(\left(y \cdot z - t \cdot a\right) \cdot \left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right)\right) \cdot \sqrt[3]{x}\right)\right)\\

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

\end{array}
double f(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
        double r4078608 = x;
        double r4078609 = y;
        double r4078610 = z;
        double r4078611 = r4078609 * r4078610;
        double r4078612 = t;
        double r4078613 = a;
        double r4078614 = r4078612 * r4078613;
        double r4078615 = r4078611 - r4078614;
        double r4078616 = r4078608 * r4078615;
        double r4078617 = b;
        double r4078618 = c;
        double r4078619 = r4078618 * r4078610;
        double r4078620 = i;
        double r4078621 = r4078620 * r4078613;
        double r4078622 = r4078619 - r4078621;
        double r4078623 = r4078617 * r4078622;
        double r4078624 = r4078616 - r4078623;
        double r4078625 = j;
        double r4078626 = r4078618 * r4078612;
        double r4078627 = r4078620 * r4078609;
        double r4078628 = r4078626 - r4078627;
        double r4078629 = r4078625 * r4078628;
        double r4078630 = r4078624 + r4078629;
        return r4078630;
}

double f(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
        double r4078631 = z;
        double r4078632 = -1.327033599359954e+156;
        bool r4078633 = r4078631 <= r4078632;
        double r4078634 = t;
        double r4078635 = c;
        double r4078636 = r4078634 * r4078635;
        double r4078637 = y;
        double r4078638 = i;
        double r4078639 = r4078637 * r4078638;
        double r4078640 = r4078636 - r4078639;
        double r4078641 = j;
        double r4078642 = x;
        double r4078643 = r4078642 * r4078637;
        double r4078644 = b;
        double r4078645 = r4078635 * r4078644;
        double r4078646 = r4078643 - r4078645;
        double r4078647 = r4078646 * r4078631;
        double r4078648 = r4078634 * r4078642;
        double r4078649 = a;
        double r4078650 = r4078648 * r4078649;
        double r4078651 = r4078647 - r4078650;
        double r4078652 = fma(r4078640, r4078641, r4078651);
        double r4078653 = 1.2230243741272296e-48;
        bool r4078654 = r4078631 <= r4078653;
        double r4078655 = r4078638 * r4078649;
        double r4078656 = r4078635 * r4078631;
        double r4078657 = r4078655 - r4078656;
        double r4078658 = r4078637 * r4078631;
        double r4078659 = r4078634 * r4078649;
        double r4078660 = r4078658 - r4078659;
        double r4078661 = cbrt(r4078642);
        double r4078662 = r4078661 * r4078661;
        double r4078663 = r4078660 * r4078662;
        double r4078664 = r4078663 * r4078661;
        double r4078665 = fma(r4078657, r4078644, r4078664);
        double r4078666 = fma(r4078640, r4078641, r4078665);
        double r4078667 = r4078654 ? r4078666 : r4078652;
        double r4078668 = r4078633 ? r4078652 : r4078667;
        return r4078668;
}

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 < -1.327033599359954e+156 or 1.2230243741272296e-48 < z

    1. Initial program 17.5

      \[\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. Simplified17.5

      \[\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-cbrt17.8

      \[\leadsto \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 \color{blue}{\left(\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \sqrt[3]{x}\right)}\right)\right)\]
    5. Applied associate-*r*17.8

      \[\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(z \cdot y - t \cdot a\right) \cdot \left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right)\right) \cdot \sqrt[3]{x}}\right)\right)\]
    6. Taylor expanded around inf 18.9

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

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

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

    if -1.327033599359954e+156 < z < 1.2230243741272296e-48

    1. Initial program 10.5

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

      \[\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-cbrt10.8

      \[\leadsto \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 \color{blue}{\left(\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \sqrt[3]{x}\right)}\right)\right)\]
    5. Applied associate-*r*10.8

      \[\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(z \cdot y - t \cdot a\right) \cdot \left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right)\right) \cdot \sqrt[3]{x}}\right)\right)\]
  3. Recombined 2 regimes into one program.
  4. Final simplification11.8

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

Reproduce

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