Average Error: 12.4 → 12.3
Time: 11.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}\;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 + -1 \cdot \left(a \cdot \left(x \cdot t\right)\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{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 + -1 \cdot \left(a \cdot \left(x \cdot t\right)\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{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 r111550 = x;
        double r111551 = y;
        double r111552 = z;
        double r111553 = r111551 * r111552;
        double r111554 = t;
        double r111555 = a;
        double r111556 = r111554 * r111555;
        double r111557 = r111553 - r111556;
        double r111558 = r111550 * r111557;
        double r111559 = b;
        double r111560 = c;
        double r111561 = r111560 * r111552;
        double r111562 = i;
        double r111563 = r111562 * r111555;
        double r111564 = r111561 - r111563;
        double r111565 = r111559 * r111564;
        double r111566 = r111558 - r111565;
        double r111567 = j;
        double r111568 = r111560 * r111554;
        double r111569 = r111562 * r111551;
        double r111570 = r111568 - r111569;
        double r111571 = r111567 * r111570;
        double r111572 = r111566 + r111571;
        return r111572;
}

double f(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
        double r111573 = a;
        double r111574 = -2.3295746151951428e-268;
        bool r111575 = r111573 <= r111574;
        double r111576 = c;
        double r111577 = t;
        double r111578 = r111576 * r111577;
        double r111579 = i;
        double r111580 = y;
        double r111581 = r111579 * r111580;
        double r111582 = r111578 - r111581;
        double r111583 = j;
        double r111584 = x;
        double r111585 = r111584 * r111580;
        double r111586 = z;
        double r111587 = r111585 * r111586;
        double r111588 = -1.0;
        double r111589 = r111584 * r111577;
        double r111590 = r111573 * r111589;
        double r111591 = r111588 * r111590;
        double r111592 = r111587 + r111591;
        double r111593 = b;
        double r111594 = r111576 * r111586;
        double r111595 = r111579 * r111573;
        double r111596 = r111594 - r111595;
        double r111597 = r111593 * r111596;
        double r111598 = -r111573;
        double r111599 = r111573 * r111579;
        double r111600 = fma(r111598, r111579, r111599);
        double r111601 = r111593 * r111600;
        double r111602 = r111597 + r111601;
        double r111603 = r111592 - r111602;
        double r111604 = fma(r111582, r111583, r111603);
        double r111605 = 1.6224269897276793e+122;
        bool r111606 = r111573 <= r111605;
        double r111607 = cbrt(r111584);
        double r111608 = r111607 * r111607;
        double r111609 = r111580 * r111586;
        double r111610 = r111607 * r111609;
        double r111611 = r111608 * r111610;
        double r111612 = r111577 * r111573;
        double r111613 = -r111612;
        double r111614 = r111584 * r111613;
        double r111615 = r111611 + r111614;
        double r111616 = r111615 - r111602;
        double r111617 = fma(r111582, r111583, r111616);
        double r111618 = r111579 * r111593;
        double r111619 = r111593 * r111576;
        double r111620 = fma(r111586, r111619, r111590);
        double r111621 = -r111620;
        double r111622 = fma(r111573, r111618, r111621);
        double r111623 = r111606 ? r111617 : r111622;
        double r111624 = r111575 ? r111604 : r111623;
        return r111624;
}

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. Taylor expanded around inf 12.4

      \[\leadsto \mathsf{fma}\left(c \cdot t - i \cdot y, j, \left(\left(x \cdot y\right) \cdot z + \color{blue}{-1 \cdot \left(a \cdot \left(x \cdot t\right)\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 -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 + -1 \cdot \left(a \cdot \left(x \cdot t\right)\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{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)))))