Average Error: 12.4 → 12.3
Time: 11.7s
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}\;a \le -2.329574615195142828419975702711333531113 \cdot 10^{-268}:\\ \;\;\;\;\mathsf{fma}\left(c \cdot t - i \cdot y, j, \left(\left(x \cdot y\right) \cdot z + \left(x \cdot \left(-t\right)\right) \cdot a\right) - \left(b \cdot \left(c \cdot z - i \cdot a\right) + b \cdot \mathsf{fma}\left(-a, i, a \cdot i\right)\right)\right)\\ \mathbf{elif}\;a \le 1.622426989727679313206537450117033416418 \cdot 10^{122}:\\ \;\;\;\;\mathsf{fma}\left(c \cdot t - i \cdot y, j, \left(\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \left(\sqrt[3]{x} \cdot \left(y \cdot z\right)\right) + x \cdot \left(-t \cdot a\right)\right) - \left(b \cdot \left(c \cdot z - i \cdot a\right) + b \cdot \mathsf{fma}\left(-a, i, a \cdot i\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(a, i \cdot b, -\mathsf{fma}\left(z, b \cdot c, a \cdot \left(x \cdot t\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}\;a \le -2.329574615195142828419975702711333531113 \cdot 10^{-268}:\\
\;\;\;\;\mathsf{fma}\left(c \cdot t - i \cdot y, j, \left(\left(x \cdot y\right) \cdot z + \left(x \cdot \left(-t\right)\right) \cdot a\right) - \left(b \cdot \left(c \cdot z - i \cdot a\right) + b \cdot \mathsf{fma}\left(-a, i, a \cdot i\right)\right)\right)\\

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

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a, i \cdot b, -\mathsf{fma}\left(z, b \cdot c, a \cdot \left(x \cdot t\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 r114553 = x;
        double r114554 = y;
        double r114555 = z;
        double r114556 = r114554 * r114555;
        double r114557 = t;
        double r114558 = a;
        double r114559 = r114557 * r114558;
        double r114560 = r114556 - r114559;
        double r114561 = r114553 * r114560;
        double r114562 = b;
        double r114563 = c;
        double r114564 = r114563 * r114555;
        double r114565 = i;
        double r114566 = r114565 * r114558;
        double r114567 = r114564 - r114566;
        double r114568 = r114562 * r114567;
        double r114569 = r114561 - r114568;
        double r114570 = j;
        double r114571 = r114563 * r114557;
        double r114572 = r114565 * r114554;
        double r114573 = r114571 - r114572;
        double r114574 = r114570 * r114573;
        double r114575 = r114569 + r114574;
        return r114575;
}

double f(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
        double r114576 = a;
        double r114577 = -2.3295746151951428e-268;
        bool r114578 = r114576 <= r114577;
        double r114579 = c;
        double r114580 = t;
        double r114581 = r114579 * r114580;
        double r114582 = i;
        double r114583 = y;
        double r114584 = r114582 * r114583;
        double r114585 = r114581 - r114584;
        double r114586 = j;
        double r114587 = x;
        double r114588 = r114587 * r114583;
        double r114589 = z;
        double r114590 = r114588 * r114589;
        double r114591 = -r114580;
        double r114592 = r114587 * r114591;
        double r114593 = r114592 * r114576;
        double r114594 = r114590 + r114593;
        double r114595 = b;
        double r114596 = r114579 * r114589;
        double r114597 = r114582 * r114576;
        double r114598 = r114596 - r114597;
        double r114599 = r114595 * r114598;
        double r114600 = -r114576;
        double r114601 = r114576 * r114582;
        double r114602 = fma(r114600, r114582, r114601);
        double r114603 = r114595 * r114602;
        double r114604 = r114599 + r114603;
        double r114605 = r114594 - r114604;
        double r114606 = fma(r114585, r114586, r114605);
        double r114607 = 1.6224269897276793e+122;
        bool r114608 = r114576 <= r114607;
        double r114609 = cbrt(r114587);
        double r114610 = r114609 * r114609;
        double r114611 = r114583 * r114589;
        double r114612 = r114609 * r114611;
        double r114613 = r114610 * r114612;
        double r114614 = r114580 * r114576;
        double r114615 = -r114614;
        double r114616 = r114587 * r114615;
        double r114617 = r114613 + r114616;
        double r114618 = r114617 - r114604;
        double r114619 = fma(r114585, r114586, r114618);
        double r114620 = r114582 * r114595;
        double r114621 = r114595 * r114579;
        double r114622 = r114587 * r114580;
        double r114623 = r114576 * r114622;
        double r114624 = fma(r114589, r114621, r114623);
        double r114625 = -r114624;
        double r114626 = fma(r114576, r114620, r114625);
        double r114627 = r114608 ? r114619 : r114626;
        double r114628 = r114578 ? r114606 : r114627;
        return r114628;
}

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 a < -2.3295746151951428e-268

    1. Initial program 12.2

      \[\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. Simplified12.2

      \[\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-diff12.2

      \[\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-in12.2

      \[\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. Simplified12.2

      \[\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(c \cdot z - i \cdot a\right)} + b \cdot \mathsf{fma}\left(-a, i, a \cdot i\right)\right)\right)\]
    7. Using strategy rm
    8. Applied sub-neg12.2

      \[\leadsto \mathsf{fma}\left(c \cdot t - i \cdot y, j, x \cdot \color{blue}{\left(y \cdot z + \left(-t \cdot a\right)\right)} - \left(b \cdot \left(c \cdot z - i \cdot a\right) + b \cdot \mathsf{fma}\left(-a, i, a \cdot i\right)\right)\right)\]
    9. Applied distribute-lft-in12.2

      \[\leadsto \mathsf{fma}\left(c \cdot t - i \cdot y, j, \color{blue}{\left(x \cdot \left(y \cdot z\right) + x \cdot \left(-t \cdot a\right)\right)} - \left(b \cdot \left(c \cdot z - i \cdot a\right) + b \cdot \mathsf{fma}\left(-a, i, a \cdot i\right)\right)\right)\]
    10. Using strategy rm
    11. Applied associate-*r*12.6

      \[\leadsto \mathsf{fma}\left(c \cdot t - i \cdot y, j, \left(\color{blue}{\left(x \cdot y\right) \cdot z} + x \cdot \left(-t \cdot a\right)\right) - \left(b \cdot \left(c \cdot z - i \cdot a\right) + b \cdot \mathsf{fma}\left(-a, i, a \cdot i\right)\right)\right)\]
    12. Using strategy rm
    13. Applied distribute-lft-neg-in12.6

      \[\leadsto \mathsf{fma}\left(c \cdot t - i \cdot y, j, \left(\left(x \cdot y\right) \cdot z + x \cdot \color{blue}{\left(\left(-t\right) \cdot a\right)}\right) - \left(b \cdot \left(c \cdot z - i \cdot a\right) + b \cdot \mathsf{fma}\left(-a, i, a \cdot i\right)\right)\right)\]
    14. Applied associate-*r*12.4

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

    if -2.3295746151951428e-268 < a < 1.6224269897276793e+122

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

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

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

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

      \[\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(c \cdot z - i \cdot a\right)} + b \cdot \mathsf{fma}\left(-a, i, a \cdot i\right)\right)\right)\]
    7. Using strategy rm
    8. Applied sub-neg10.3

      \[\leadsto \mathsf{fma}\left(c \cdot t - i \cdot y, j, x \cdot \color{blue}{\left(y \cdot z + \left(-t \cdot a\right)\right)} - \left(b \cdot \left(c \cdot z - i \cdot a\right) + b \cdot \mathsf{fma}\left(-a, i, a \cdot i\right)\right)\right)\]
    9. Applied distribute-lft-in10.3

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

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

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

    if 1.6224269897276793e+122 < a

    1. Initial program 23.1

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

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

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

      \[\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)}\]
  3. Recombined 3 regimes into one program.
  4. Final simplification12.3

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

Reproduce

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