Average Error: 12.4 → 12.0
Time: 25.3s
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}\;c \le -2.056175201748675770382017624042888738317 \cdot 10^{114}:\\ \;\;\;\;c \cdot \left(t \cdot j - z \cdot b\right) - i \cdot \left(j \cdot y\right)\\ \mathbf{elif}\;c \le 1.487674112536942096916318817771319629867 \cdot 10^{91}:\\ \;\;\;\;\mathsf{fma}\left(x, y \cdot z - t \cdot a, \mathsf{fma}\left(b, i \cdot a - c \cdot z, \left(j \cdot \left(\sqrt[3]{c \cdot t - i \cdot y} \cdot \left(\sqrt[3]{\sqrt[3]{c \cdot t - i \cdot y} \cdot \sqrt[3]{c \cdot t - i \cdot y}} \cdot \sqrt[3]{\sqrt[3]{c \cdot t - i \cdot y}}\right)\right)\right) \cdot \sqrt[3]{c \cdot t - i \cdot y}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(x, y \cdot z - t \cdot a, c \cdot \left(t \cdot j - z \cdot b\right) - \left(i \cdot y\right) \cdot j\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}\;c \le -2.056175201748675770382017624042888738317 \cdot 10^{114}:\\
\;\;\;\;c \cdot \left(t \cdot j - z \cdot b\right) - i \cdot \left(j \cdot y\right)\\

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

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

\end{array}
double f(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
        double r94435 = x;
        double r94436 = y;
        double r94437 = z;
        double r94438 = r94436 * r94437;
        double r94439 = t;
        double r94440 = a;
        double r94441 = r94439 * r94440;
        double r94442 = r94438 - r94441;
        double r94443 = r94435 * r94442;
        double r94444 = b;
        double r94445 = c;
        double r94446 = r94445 * r94437;
        double r94447 = i;
        double r94448 = r94447 * r94440;
        double r94449 = r94446 - r94448;
        double r94450 = r94444 * r94449;
        double r94451 = r94443 - r94450;
        double r94452 = j;
        double r94453 = r94445 * r94439;
        double r94454 = r94447 * r94436;
        double r94455 = r94453 - r94454;
        double r94456 = r94452 * r94455;
        double r94457 = r94451 + r94456;
        return r94457;
}

double f(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
        double r94458 = c;
        double r94459 = -2.0561752017486758e+114;
        bool r94460 = r94458 <= r94459;
        double r94461 = t;
        double r94462 = j;
        double r94463 = r94461 * r94462;
        double r94464 = z;
        double r94465 = b;
        double r94466 = r94464 * r94465;
        double r94467 = r94463 - r94466;
        double r94468 = r94458 * r94467;
        double r94469 = i;
        double r94470 = y;
        double r94471 = r94462 * r94470;
        double r94472 = r94469 * r94471;
        double r94473 = r94468 - r94472;
        double r94474 = 1.4876741125369421e+91;
        bool r94475 = r94458 <= r94474;
        double r94476 = x;
        double r94477 = r94470 * r94464;
        double r94478 = a;
        double r94479 = r94461 * r94478;
        double r94480 = r94477 - r94479;
        double r94481 = r94469 * r94478;
        double r94482 = r94458 * r94464;
        double r94483 = r94481 - r94482;
        double r94484 = r94458 * r94461;
        double r94485 = r94469 * r94470;
        double r94486 = r94484 - r94485;
        double r94487 = cbrt(r94486);
        double r94488 = r94487 * r94487;
        double r94489 = cbrt(r94488);
        double r94490 = cbrt(r94487);
        double r94491 = r94489 * r94490;
        double r94492 = r94487 * r94491;
        double r94493 = r94462 * r94492;
        double r94494 = r94493 * r94487;
        double r94495 = fma(r94465, r94483, r94494);
        double r94496 = fma(r94476, r94480, r94495);
        double r94497 = r94485 * r94462;
        double r94498 = r94468 - r94497;
        double r94499 = fma(r94476, r94480, r94498);
        double r94500 = r94475 ? r94496 : r94499;
        double r94501 = r94460 ? r94473 : r94500;
        return r94501;
}

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 c < -2.0561752017486758e+114

    1. Initial program 21.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. Simplified21.3

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

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

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

      \[\leadsto \color{blue}{t \cdot \left(j \cdot c\right) - \left(z \cdot \left(b \cdot c\right) + i \cdot \left(j \cdot y\right)\right)}\]
    7. Simplified22.0

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

    if -2.0561752017486758e+114 < c < 1.4876741125369421e+91

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

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

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

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

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

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

    if 1.4876741125369421e+91 < c

    1. Initial program 20.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. Simplified20.0

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

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

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

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

Reproduce

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