Average Error: 11.9 → 11.2
Time: 41.6s
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}\;b \le -2.2795782386377772 \cdot 10^{-181}:\\ \;\;\;\;\mathsf{fma}\left(t \cdot c - i \cdot y, j, \mathsf{fma}\left(a \cdot i - c \cdot z, b, \mathsf{fma}\left(y, z, -t \cdot a\right) \cdot x + x \cdot \mathsf{fma}\left(-t, a, t \cdot a\right)\right)\right)\\ \mathbf{elif}\;b \le -2.2728874929835057 \cdot 10^{-303}:\\ \;\;\;\;\mathsf{fma}\left(t \cdot c - i \cdot y, j, \left(y \cdot x - c \cdot b\right) \cdot z - x \cdot \left(t \cdot a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(t \cdot c - i \cdot y, j, \mathsf{fma}\left(a \cdot i - c \cdot z, b, \mathsf{fma}\left(y, z, -t \cdot a\right) \cdot x + x \cdot \mathsf{fma}\left(-t, a, t \cdot a\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}\;b \le -2.2795782386377772 \cdot 10^{-181}:\\
\;\;\;\;\mathsf{fma}\left(t \cdot c - i \cdot y, j, \mathsf{fma}\left(a \cdot i - c \cdot z, b, \mathsf{fma}\left(y, z, -t \cdot a\right) \cdot x + x \cdot \mathsf{fma}\left(-t, a, t \cdot a\right)\right)\right)\\

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

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t \cdot c - i \cdot y, j, \mathsf{fma}\left(a \cdot i - c \cdot z, b, \mathsf{fma}\left(y, z, -t \cdot a\right) \cdot x + x \cdot \mathsf{fma}\left(-t, a, t \cdot a\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 r3806478 = x;
        double r3806479 = y;
        double r3806480 = z;
        double r3806481 = r3806479 * r3806480;
        double r3806482 = t;
        double r3806483 = a;
        double r3806484 = r3806482 * r3806483;
        double r3806485 = r3806481 - r3806484;
        double r3806486 = r3806478 * r3806485;
        double r3806487 = b;
        double r3806488 = c;
        double r3806489 = r3806488 * r3806480;
        double r3806490 = i;
        double r3806491 = r3806490 * r3806483;
        double r3806492 = r3806489 - r3806491;
        double r3806493 = r3806487 * r3806492;
        double r3806494 = r3806486 - r3806493;
        double r3806495 = j;
        double r3806496 = r3806488 * r3806482;
        double r3806497 = r3806490 * r3806479;
        double r3806498 = r3806496 - r3806497;
        double r3806499 = r3806495 * r3806498;
        double r3806500 = r3806494 + r3806499;
        return r3806500;
}

double f(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
        double r3806501 = b;
        double r3806502 = -2.2795782386377772e-181;
        bool r3806503 = r3806501 <= r3806502;
        double r3806504 = t;
        double r3806505 = c;
        double r3806506 = r3806504 * r3806505;
        double r3806507 = i;
        double r3806508 = y;
        double r3806509 = r3806507 * r3806508;
        double r3806510 = r3806506 - r3806509;
        double r3806511 = j;
        double r3806512 = a;
        double r3806513 = r3806512 * r3806507;
        double r3806514 = z;
        double r3806515 = r3806505 * r3806514;
        double r3806516 = r3806513 - r3806515;
        double r3806517 = r3806504 * r3806512;
        double r3806518 = -r3806517;
        double r3806519 = fma(r3806508, r3806514, r3806518);
        double r3806520 = x;
        double r3806521 = r3806519 * r3806520;
        double r3806522 = -r3806504;
        double r3806523 = fma(r3806522, r3806512, r3806517);
        double r3806524 = r3806520 * r3806523;
        double r3806525 = r3806521 + r3806524;
        double r3806526 = fma(r3806516, r3806501, r3806525);
        double r3806527 = fma(r3806510, r3806511, r3806526);
        double r3806528 = -2.2728874929835057e-303;
        bool r3806529 = r3806501 <= r3806528;
        double r3806530 = r3806508 * r3806520;
        double r3806531 = r3806505 * r3806501;
        double r3806532 = r3806530 - r3806531;
        double r3806533 = r3806532 * r3806514;
        double r3806534 = r3806520 * r3806517;
        double r3806535 = r3806533 - r3806534;
        double r3806536 = fma(r3806510, r3806511, r3806535);
        double r3806537 = r3806529 ? r3806536 : r3806527;
        double r3806538 = r3806503 ? r3806527 : r3806537;
        return r3806538;
}

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 b < -2.2795782386377772e-181 or -2.2728874929835057e-303 < b

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(t \cdot c - y \cdot i, j, \mathsf{fma}\left(a \cdot i - 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.3

      \[\leadsto \mathsf{fma}\left(t \cdot c - y \cdot i, j, \mathsf{fma}\left(a \cdot i - 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*11.3

      \[\leadsto \mathsf{fma}\left(t \cdot c - y \cdot i, j, \mathsf{fma}\left(a \cdot i - 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 11.3

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

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

      \[\leadsto \mathsf{fma}\left(t \cdot c - y \cdot i, j, \mathsf{fma}\left(a \cdot i - z \cdot c, b, x \cdot \color{blue}{\left(\mathsf{fma}\left(y, z, -t \cdot a\right) + \mathsf{fma}\left(-t, a, t \cdot a\right)\right)}\right)\right)\]
    10. Applied distribute-rgt-in11.1

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

    if -2.2795782386377772e-181 < b < -2.2728874929835057e-303

    1. Initial program 17.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. Simplified17.6

      \[\leadsto \color{blue}{\mathsf{fma}\left(t \cdot c - y \cdot i, j, \mathsf{fma}\left(a \cdot i - 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.9

      \[\leadsto \mathsf{fma}\left(t \cdot c - y \cdot i, j, \mathsf{fma}\left(a \cdot i - 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.9

      \[\leadsto \mathsf{fma}\left(t \cdot c - y \cdot i, j, \mathsf{fma}\left(a \cdot i - 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 14.5

      \[\leadsto \mathsf{fma}\left(t \cdot c - y \cdot i, 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. Simplified12.5

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \le -2.2795782386377772 \cdot 10^{-181}:\\ \;\;\;\;\mathsf{fma}\left(t \cdot c - i \cdot y, j, \mathsf{fma}\left(a \cdot i - c \cdot z, b, \mathsf{fma}\left(y, z, -t \cdot a\right) \cdot x + x \cdot \mathsf{fma}\left(-t, a, t \cdot a\right)\right)\right)\\ \mathbf{elif}\;b \le -2.2728874929835057 \cdot 10^{-303}:\\ \;\;\;\;\mathsf{fma}\left(t \cdot c - i \cdot y, j, \left(y \cdot x - c \cdot b\right) \cdot z - x \cdot \left(t \cdot a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(t \cdot c - i \cdot y, j, \mathsf{fma}\left(a \cdot i - c \cdot z, b, \mathsf{fma}\left(y, z, -t \cdot a\right) \cdot x + x \cdot \mathsf{fma}\left(-t, a, t \cdot a\right)\right)\right)\\ \end{array}\]

Reproduce

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