Average Error: 62.0 → 0
Time: 4.6s
Precision: 64
\[x = 10864 \land y = 18817\]
\[9 \cdot {x}^{4} - \left(y \cdot y\right) \cdot \left(y \cdot y - 2\right)\]
\[\mathsf{fma}\left(2 - y \cdot y, y \cdot y, 9 \cdot {x}^{4}\right)\]
9 \cdot {x}^{4} - \left(y \cdot y\right) \cdot \left(y \cdot y - 2\right)
\mathsf{fma}\left(2 - y \cdot y, y \cdot y, 9 \cdot {x}^{4}\right)
double f(double x, double y) {
        double r2062472 = 9.0;
        double r2062473 = x;
        double r2062474 = 4.0;
        double r2062475 = pow(r2062473, r2062474);
        double r2062476 = r2062472 * r2062475;
        double r2062477 = y;
        double r2062478 = r2062477 * r2062477;
        double r2062479 = 2.0;
        double r2062480 = r2062478 - r2062479;
        double r2062481 = r2062478 * r2062480;
        double r2062482 = r2062476 - r2062481;
        return r2062482;
}

double f(double x, double y) {
        double r2062483 = 2.0;
        double r2062484 = y;
        double r2062485 = r2062484 * r2062484;
        double r2062486 = r2062483 - r2062485;
        double r2062487 = 9.0;
        double r2062488 = x;
        double r2062489 = 4.0;
        double r2062490 = pow(r2062488, r2062489);
        double r2062491 = r2062487 * r2062490;
        double r2062492 = fma(r2062486, r2062485, r2062491);
        return r2062492;
}

Error

Derivation

  1. Initial program 62.0

    \[9 \cdot {x}^{4} - \left(y \cdot y\right) \cdot \left(y \cdot y - 2\right)\]
  2. Simplified0

    \[\leadsto \color{blue}{\mathsf{fma}\left(2 - y \cdot y, y \cdot y, {x}^{4} \cdot 9\right)}\]
  3. Final simplification0

    \[\leadsto \mathsf{fma}\left(2 - y \cdot y, y \cdot y, 9 \cdot {x}^{4}\right)\]

Reproduce

herbie shell --seed 2019171 +o rules:numerics
(FPCore (x y)
  :name "From Rump in a 1983 paper, rewritten"
  :pre (and (== x 10864.0) (== y 18817.0))
  (- (* 9.0 (pow x 4.0)) (* (* y y) (- (* y y) 2.0))))