Average Error: 11.1 → 11.2
Time: 29.0s
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)\]
\[\left(\left(x \cdot \left(z \cdot y - a \cdot t\right) + x \cdot \mathsf{fma}\left(-a, t, a \cdot t\right)\right) - \left(\mathsf{fma}\left(-a, i, i \cdot a\right) \cdot b + b \cdot \left(c \cdot z - i \cdot a\right)\right)\right) + \left(j \cdot \mathsf{fma}\left(c, t, \left(-i\right) \cdot y\right) + \mathsf{fma}\left(-y, i, i \cdot y\right) \cdot j\right)\]
\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)
\left(\left(x \cdot \left(z \cdot y - a \cdot t\right) + x \cdot \mathsf{fma}\left(-a, t, a \cdot t\right)\right) - \left(\mathsf{fma}\left(-a, i, i \cdot a\right) \cdot b + b \cdot \left(c \cdot z - i \cdot a\right)\right)\right) + \left(j \cdot \mathsf{fma}\left(c, t, \left(-i\right) \cdot y\right) + \mathsf{fma}\left(-y, i, i \cdot y\right) \cdot j\right)
double f(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
        double r2987436 = x;
        double r2987437 = y;
        double r2987438 = z;
        double r2987439 = r2987437 * r2987438;
        double r2987440 = t;
        double r2987441 = a;
        double r2987442 = r2987440 * r2987441;
        double r2987443 = r2987439 - r2987442;
        double r2987444 = r2987436 * r2987443;
        double r2987445 = b;
        double r2987446 = c;
        double r2987447 = r2987446 * r2987438;
        double r2987448 = i;
        double r2987449 = r2987448 * r2987441;
        double r2987450 = r2987447 - r2987449;
        double r2987451 = r2987445 * r2987450;
        double r2987452 = r2987444 - r2987451;
        double r2987453 = j;
        double r2987454 = r2987446 * r2987440;
        double r2987455 = r2987448 * r2987437;
        double r2987456 = r2987454 - r2987455;
        double r2987457 = r2987453 * r2987456;
        double r2987458 = r2987452 + r2987457;
        return r2987458;
}

double f(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
        double r2987459 = x;
        double r2987460 = z;
        double r2987461 = y;
        double r2987462 = r2987460 * r2987461;
        double r2987463 = a;
        double r2987464 = t;
        double r2987465 = r2987463 * r2987464;
        double r2987466 = r2987462 - r2987465;
        double r2987467 = r2987459 * r2987466;
        double r2987468 = -r2987463;
        double r2987469 = fma(r2987468, r2987464, r2987465);
        double r2987470 = r2987459 * r2987469;
        double r2987471 = r2987467 + r2987470;
        double r2987472 = i;
        double r2987473 = r2987472 * r2987463;
        double r2987474 = fma(r2987468, r2987472, r2987473);
        double r2987475 = b;
        double r2987476 = r2987474 * r2987475;
        double r2987477 = c;
        double r2987478 = r2987477 * r2987460;
        double r2987479 = r2987478 - r2987473;
        double r2987480 = r2987475 * r2987479;
        double r2987481 = r2987476 + r2987480;
        double r2987482 = r2987471 - r2987481;
        double r2987483 = j;
        double r2987484 = -r2987472;
        double r2987485 = r2987484 * r2987461;
        double r2987486 = fma(r2987477, r2987464, r2987485);
        double r2987487 = r2987483 * r2987486;
        double r2987488 = -r2987461;
        double r2987489 = r2987472 * r2987461;
        double r2987490 = fma(r2987488, r2987472, r2987489);
        double r2987491 = r2987490 * r2987483;
        double r2987492 = r2987487 + r2987491;
        double r2987493 = r2987482 + r2987492;
        return r2987493;
}

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. Initial program 11.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. Using strategy rm
  3. Applied prod-diff11.1

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

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

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

    \[\leadsto \left(\left(\left(z \cdot y - a \cdot t\right) \cdot x + x \cdot \mathsf{fma}\left(-a, t, a \cdot t\right)\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) + j \cdot \left(c \cdot t - i \cdot y\right)\]
  8. Applied distribute-lft-in11.2

    \[\leadsto \left(\left(\left(z \cdot y - a \cdot t\right) \cdot x + x \cdot \mathsf{fma}\left(-a, t, a \cdot t\right)\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) + j \cdot \left(c \cdot t - i \cdot y\right)\]
  9. Simplified11.2

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

    \[\leadsto \left(\left(\left(z \cdot y - a \cdot t\right) \cdot x + x \cdot \mathsf{fma}\left(-a, t, a \cdot t\right)\right) - \left(\left(z \cdot c - a \cdot i\right) \cdot b + b \cdot \mathsf{fma}\left(-a, i, a \cdot i\right)\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)}\]
  12. Applied distribute-lft-in11.2

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

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

Reproduce

herbie shell --seed 2019143 +o rules:numerics
(FPCore (x y z t a b c i j)
  :name "Linear.Matrix:det33 from linear-1.19.1.3"
  (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (* j (- (* c t) (* i y)))))