Average Error: 12.1 → 11.7
Time: 17.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 -1.676125200346277180567878771994403871573 \cdot 10^{-115}:\\ \;\;\;\;\mathsf{fma}\left(c, t \cdot j, \left(\left(x \cdot z\right) \cdot y + \left(-a \cdot \left(x \cdot t\right)\right)\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + \left(-i \cdot y\right) \cdot j\\ \mathbf{elif}\;c \le 8.063153770504283089442778760046940031549 \cdot 10^{-191}:\\ \;\;\;\;\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) + \mathsf{fma}\left(-y, i, y \cdot i\right) \cdot j\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(c, t \cdot j, \left(x \cdot \left(z \cdot y\right) + \left(-\left(a \cdot x\right) \cdot t\right)\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + \left(-i \cdot y\right) \cdot j\\ \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 -1.676125200346277180567878771994403871573 \cdot 10^{-115}:\\
\;\;\;\;\mathsf{fma}\left(c, t \cdot j, \left(\left(x \cdot z\right) \cdot y + \left(-a \cdot \left(x \cdot t\right)\right)\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + \left(-i \cdot y\right) \cdot j\\

\mathbf{elif}\;c \le 8.063153770504283089442778760046940031549 \cdot 10^{-191}:\\
\;\;\;\;\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) + \mathsf{fma}\left(-y, i, y \cdot i\right) \cdot j\\

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

\end{array}
double f(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
        double r108371 = x;
        double r108372 = y;
        double r108373 = z;
        double r108374 = r108372 * r108373;
        double r108375 = t;
        double r108376 = a;
        double r108377 = r108375 * r108376;
        double r108378 = r108374 - r108377;
        double r108379 = r108371 * r108378;
        double r108380 = b;
        double r108381 = c;
        double r108382 = r108381 * r108373;
        double r108383 = i;
        double r108384 = r108383 * r108376;
        double r108385 = r108382 - r108384;
        double r108386 = r108380 * r108385;
        double r108387 = r108379 - r108386;
        double r108388 = j;
        double r108389 = r108381 * r108375;
        double r108390 = r108383 * r108372;
        double r108391 = r108389 - r108390;
        double r108392 = r108388 * r108391;
        double r108393 = r108387 + r108392;
        return r108393;
}

double f(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
        double r108394 = c;
        double r108395 = -1.6761252003462772e-115;
        bool r108396 = r108394 <= r108395;
        double r108397 = t;
        double r108398 = j;
        double r108399 = r108397 * r108398;
        double r108400 = x;
        double r108401 = z;
        double r108402 = r108400 * r108401;
        double r108403 = y;
        double r108404 = r108402 * r108403;
        double r108405 = a;
        double r108406 = r108400 * r108397;
        double r108407 = r108405 * r108406;
        double r108408 = -r108407;
        double r108409 = r108404 + r108408;
        double r108410 = b;
        double r108411 = r108394 * r108401;
        double r108412 = i;
        double r108413 = r108412 * r108405;
        double r108414 = r108411 - r108413;
        double r108415 = r108410 * r108414;
        double r108416 = r108409 - r108415;
        double r108417 = fma(r108394, r108399, r108416);
        double r108418 = r108412 * r108403;
        double r108419 = -r108418;
        double r108420 = r108419 * r108398;
        double r108421 = r108417 + r108420;
        double r108422 = 8.063153770504283e-191;
        bool r108423 = r108394 <= r108422;
        double r108424 = r108394 * r108397;
        double r108425 = r108424 - r108418;
        double r108426 = r108403 * r108401;
        double r108427 = r108397 * r108405;
        double r108428 = r108426 - r108427;
        double r108429 = r108400 * r108428;
        double r108430 = r108429 - r108415;
        double r108431 = fma(r108425, r108398, r108430);
        double r108432 = -r108403;
        double r108433 = r108403 * r108412;
        double r108434 = fma(r108432, r108412, r108433);
        double r108435 = r108434 * r108398;
        double r108436 = r108431 + r108435;
        double r108437 = r108401 * r108403;
        double r108438 = r108400 * r108437;
        double r108439 = r108405 * r108400;
        double r108440 = r108439 * r108397;
        double r108441 = -r108440;
        double r108442 = r108438 + r108441;
        double r108443 = r108442 - r108415;
        double r108444 = fma(r108394, r108399, r108443);
        double r108445 = r108444 + r108420;
        double r108446 = r108423 ? r108436 : r108445;
        double r108447 = r108396 ? r108421 : r108446;
        return r108447;
}

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 < -1.6761252003462772e-115

    1. Initial program 13.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. Using strategy rm
    3. Applied sub-neg13.8

      \[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \color{blue}{\left(c \cdot t + \left(-i \cdot y\right)\right)}\]
    4. Applied distribute-rgt-in13.8

      \[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + \color{blue}{\left(\left(c \cdot t\right) \cdot j + \left(-i \cdot y\right) \cdot j\right)}\]
    5. Applied associate-+r+13.8

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

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

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

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

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

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

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

    if -1.6761252003462772e-115 < c < 8.063153770504283e-191

    1. Initial program 9.7

      \[\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. Using strategy rm
    3. Applied prod-diff9.7

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

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

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

      \[\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)} + \mathsf{fma}\left(-y, i, y \cdot i\right) \cdot j\]

    if 8.063153770504283e-191 < c

    1. Initial program 12.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. Using strategy rm
    3. Applied sub-neg12.6

      \[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \color{blue}{\left(c \cdot t + \left(-i \cdot y\right)\right)}\]
    4. Applied distribute-rgt-in12.6

      \[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + \color{blue}{\left(\left(c \cdot t\right) \cdot j + \left(-i \cdot y\right) \cdot j\right)}\]
    5. Applied associate-+r+12.6

      \[\leadsto \color{blue}{\left(\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + \left(c \cdot t\right) \cdot j\right) + \left(-i \cdot y\right) \cdot j}\]
    6. Simplified12.1

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \le -1.676125200346277180567878771994403871573 \cdot 10^{-115}:\\ \;\;\;\;\mathsf{fma}\left(c, t \cdot j, \left(\left(x \cdot z\right) \cdot y + \left(-a \cdot \left(x \cdot t\right)\right)\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + \left(-i \cdot y\right) \cdot j\\ \mathbf{elif}\;c \le 8.063153770504283089442778760046940031549 \cdot 10^{-191}:\\ \;\;\;\;\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) + \mathsf{fma}\left(-y, i, y \cdot i\right) \cdot j\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(c, t \cdot j, \left(x \cdot \left(z \cdot y\right) + \left(-\left(a \cdot x\right) \cdot t\right)\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + \left(-i \cdot y\right) \cdot j\\ \end{array}\]

Reproduce

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