Average Error: 12.5 → 11.7
Time: 29.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}\;c \le -3.901398444012408289690870526806490332773 \cdot 10^{-84}:\\ \;\;\;\;\mathsf{fma}\left(x, y \cdot z - t \cdot a, \left(a \cdot \left(i \cdot b\right) + \left(-\left(z \cdot b\right) \cdot c\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right)\right)\\ \mathbf{elif}\;c \le 3.131592390228502872785849711316130423573 \cdot 10^{-19}:\\ \;\;\;\;\mathsf{fma}\left(x, y \cdot z - t \cdot a, \left(\left(i \cdot a\right) \cdot b + \left(-z \cdot \left(b \cdot c\right)\right)\right) + \left(\sqrt[3]{j \cdot \left(c \cdot t - i \cdot y\right)} \cdot \sqrt[3]{j \cdot \left(c \cdot t - i \cdot y\right)}\right) \cdot \sqrt[3]{j \cdot \left(c \cdot t - i \cdot y\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(x, y \cdot z - t \cdot a, \left(a \cdot \left(i \cdot b\right) + \left(-z \cdot \left(b \cdot c\right)\right)\right) + \left(j \cdot \left(c \cdot t\right) + \left(-i \cdot \left(j \cdot y\right)\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}\;c \le -3.901398444012408289690870526806490332773 \cdot 10^{-84}:\\
\;\;\;\;\mathsf{fma}\left(x, y \cdot z - t \cdot a, \left(a \cdot \left(i \cdot b\right) + \left(-\left(z \cdot b\right) \cdot c\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right)\right)\\

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

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x, y \cdot z - t \cdot a, \left(a \cdot \left(i \cdot b\right) + \left(-z \cdot \left(b \cdot c\right)\right)\right) + \left(j \cdot \left(c \cdot t\right) + \left(-i \cdot \left(j \cdot y\right)\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 r85337 = x;
        double r85338 = y;
        double r85339 = z;
        double r85340 = r85338 * r85339;
        double r85341 = t;
        double r85342 = a;
        double r85343 = r85341 * r85342;
        double r85344 = r85340 - r85343;
        double r85345 = r85337 * r85344;
        double r85346 = b;
        double r85347 = c;
        double r85348 = r85347 * r85339;
        double r85349 = i;
        double r85350 = r85349 * r85342;
        double r85351 = r85348 - r85350;
        double r85352 = r85346 * r85351;
        double r85353 = r85345 - r85352;
        double r85354 = j;
        double r85355 = r85347 * r85341;
        double r85356 = r85349 * r85338;
        double r85357 = r85355 - r85356;
        double r85358 = r85354 * r85357;
        double r85359 = r85353 + r85358;
        return r85359;
}

double f(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
        double r85360 = c;
        double r85361 = -3.9013984440124083e-84;
        bool r85362 = r85360 <= r85361;
        double r85363 = x;
        double r85364 = y;
        double r85365 = z;
        double r85366 = r85364 * r85365;
        double r85367 = t;
        double r85368 = a;
        double r85369 = r85367 * r85368;
        double r85370 = r85366 - r85369;
        double r85371 = i;
        double r85372 = b;
        double r85373 = r85371 * r85372;
        double r85374 = r85368 * r85373;
        double r85375 = r85365 * r85372;
        double r85376 = r85375 * r85360;
        double r85377 = -r85376;
        double r85378 = r85374 + r85377;
        double r85379 = j;
        double r85380 = r85360 * r85367;
        double r85381 = r85371 * r85364;
        double r85382 = r85380 - r85381;
        double r85383 = r85379 * r85382;
        double r85384 = r85378 + r85383;
        double r85385 = fma(r85363, r85370, r85384);
        double r85386 = 3.131592390228503e-19;
        bool r85387 = r85360 <= r85386;
        double r85388 = r85371 * r85368;
        double r85389 = r85388 * r85372;
        double r85390 = r85372 * r85360;
        double r85391 = r85365 * r85390;
        double r85392 = -r85391;
        double r85393 = r85389 + r85392;
        double r85394 = cbrt(r85383);
        double r85395 = r85394 * r85394;
        double r85396 = r85395 * r85394;
        double r85397 = r85393 + r85396;
        double r85398 = fma(r85363, r85370, r85397);
        double r85399 = r85374 + r85392;
        double r85400 = r85379 * r85380;
        double r85401 = r85379 * r85364;
        double r85402 = r85371 * r85401;
        double r85403 = -r85402;
        double r85404 = r85400 + r85403;
        double r85405 = r85399 + r85404;
        double r85406 = fma(r85363, r85370, r85405);
        double r85407 = r85387 ? r85398 : r85406;
        double r85408 = r85362 ? r85385 : r85407;
        return r85408;
}

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 < -3.9013984440124083e-84

    1. Initial program 14.8

      \[\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. Simplified14.8

      \[\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 fma-udef14.8

      \[\leadsto \mathsf{fma}\left(x, y \cdot z - t \cdot a, \color{blue}{b \cdot \left(i \cdot a - c \cdot z\right) + j \cdot \left(c \cdot t - i \cdot y\right)}\right)\]
    5. Using strategy rm
    6. Applied sub-neg14.8

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

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

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

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

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

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

    if -3.9013984440124083e-84 < c < 3.131592390228503e-19

    1. Initial program 9.4

      \[\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. Simplified9.4

      \[\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 fma-udef9.4

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

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

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

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

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

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

    if 3.131592390228503e-19 < c

    1. Initial program 17.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. Simplified17.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. Using strategy rm
    4. Applied fma-udef17.0

      \[\leadsto \mathsf{fma}\left(x, y \cdot z - t \cdot a, \color{blue}{b \cdot \left(i \cdot a - c \cdot z\right) + j \cdot \left(c \cdot t - i \cdot y\right)}\right)\]
    5. Using strategy rm
    6. Applied sub-neg17.0

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

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

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

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

      \[\leadsto \mathsf{fma}\left(x, y \cdot z - t \cdot a, \left(\color{blue}{a \cdot \left(i \cdot b\right)} + \left(-z \cdot \left(b \cdot c\right)\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right)\right)\]
    11. Using strategy rm
    12. Applied sub-neg16.2

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

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

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

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

Reproduce

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