Average Error: 12.3 → 13.3
Time: 29.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}\;z \le 1.216221941101978796314790756047194640043 \cdot 10^{174}:\\ \;\;\;\;\mathsf{fma}\left(t \cdot c - y \cdot i, j, \mathsf{fma}\left(b, a \cdot i - c \cdot z, \left(x \cdot \sqrt[3]{\mathsf{fma}\left(t, -a, y \cdot z\right)}\right) \cdot \left(\sqrt[3]{\mathsf{fma}\left(-a, t, y \cdot z\right)} \cdot \sqrt[3]{\mathsf{fma}\left(-a, t, y \cdot z\right)}\right)\right)\right)\\ \mathbf{elif}\;z \le 5.648934867938140442590265463133244775988 \cdot 10^{209}:\\ \;\;\;\;\mathsf{fma}\left(i, \mathsf{fma}\left(a, b, -y \cdot j\right), \left(b \cdot c\right) \cdot \left(-z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\left(-z\right) \cdot b, c, x \cdot \mathsf{fma}\left(t, -a, y \cdot z\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 1.216221941101978796314790756047194640043 \cdot 10^{174}:\\
\;\;\;\;\mathsf{fma}\left(t \cdot c - y \cdot i, j, \mathsf{fma}\left(b, a \cdot i - c \cdot z, \left(x \cdot \sqrt[3]{\mathsf{fma}\left(t, -a, y \cdot z\right)}\right) \cdot \left(\sqrt[3]{\mathsf{fma}\left(-a, t, y \cdot z\right)} \cdot \sqrt[3]{\mathsf{fma}\left(-a, t, y \cdot z\right)}\right)\right)\right)\\

\mathbf{elif}\;z \le 5.648934867938140442590265463133244775988 \cdot 10^{209}:\\
\;\;\;\;\mathsf{fma}\left(i, \mathsf{fma}\left(a, b, -y \cdot j\right), \left(b \cdot c\right) \cdot \left(-z\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\left(-z\right) \cdot b, c, x \cdot \mathsf{fma}\left(t, -a, y \cdot z\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 r98472 = x;
        double r98473 = y;
        double r98474 = z;
        double r98475 = r98473 * r98474;
        double r98476 = t;
        double r98477 = a;
        double r98478 = r98476 * r98477;
        double r98479 = r98475 - r98478;
        double r98480 = r98472 * r98479;
        double r98481 = b;
        double r98482 = c;
        double r98483 = r98482 * r98474;
        double r98484 = i;
        double r98485 = r98484 * r98477;
        double r98486 = r98483 - r98485;
        double r98487 = r98481 * r98486;
        double r98488 = r98480 - r98487;
        double r98489 = j;
        double r98490 = r98482 * r98476;
        double r98491 = r98484 * r98473;
        double r98492 = r98490 - r98491;
        double r98493 = r98489 * r98492;
        double r98494 = r98488 + r98493;
        return r98494;
}

double f(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
        double r98495 = z;
        double r98496 = 1.2162219411019788e+174;
        bool r98497 = r98495 <= r98496;
        double r98498 = t;
        double r98499 = c;
        double r98500 = r98498 * r98499;
        double r98501 = y;
        double r98502 = i;
        double r98503 = r98501 * r98502;
        double r98504 = r98500 - r98503;
        double r98505 = j;
        double r98506 = b;
        double r98507 = a;
        double r98508 = r98507 * r98502;
        double r98509 = r98499 * r98495;
        double r98510 = r98508 - r98509;
        double r98511 = x;
        double r98512 = -r98507;
        double r98513 = r98501 * r98495;
        double r98514 = fma(r98498, r98512, r98513);
        double r98515 = cbrt(r98514);
        double r98516 = r98511 * r98515;
        double r98517 = fma(r98512, r98498, r98513);
        double r98518 = cbrt(r98517);
        double r98519 = r98518 * r98518;
        double r98520 = r98516 * r98519;
        double r98521 = fma(r98506, r98510, r98520);
        double r98522 = fma(r98504, r98505, r98521);
        double r98523 = 5.6489348679381404e+209;
        bool r98524 = r98495 <= r98523;
        double r98525 = r98501 * r98505;
        double r98526 = -r98525;
        double r98527 = fma(r98507, r98506, r98526);
        double r98528 = r98506 * r98499;
        double r98529 = -r98495;
        double r98530 = r98528 * r98529;
        double r98531 = fma(r98502, r98527, r98530);
        double r98532 = r98529 * r98506;
        double r98533 = r98511 * r98514;
        double r98534 = fma(r98532, r98499, r98533);
        double r98535 = r98524 ? r98531 : r98534;
        double r98536 = r98497 ? r98522 : r98535;
        return r98536;
}

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 z < 1.2162219411019788e+174

    1. Initial program 11.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. Simplified11.5

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

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

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

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

    if 1.2162219411019788e+174 < z < 5.6489348679381404e+209

    1. Initial program 22.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. Simplified22.4

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

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

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

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

      \[\leadsto \color{blue}{a \cdot \left(i \cdot b\right) - \left(z \cdot \left(b \cdot c\right) + i \cdot \left(j \cdot y\right)\right)}\]
    8. Simplified36.1

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

    if 5.6489348679381404e+209 < z

    1. Initial program 24.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. Simplified24.7

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

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

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

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

Reproduce

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