Average Error: 62.0 → 0
Time: 3.3s
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(y \cdot \mathsf{fma}\left(y, -y, 2\right), 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(y \cdot \mathsf{fma}\left(y, -y, 2\right), y, 9 \cdot {x}^{4}\right)
double f(double x, double y) {
        double r26389 = 9.0;
        double r26390 = x;
        double r26391 = 4.0;
        double r26392 = pow(r26390, r26391);
        double r26393 = r26389 * r26392;
        double r26394 = y;
        double r26395 = r26394 * r26394;
        double r26396 = 2.0;
        double r26397 = r26395 - r26396;
        double r26398 = r26395 * r26397;
        double r26399 = r26393 - r26398;
        return r26399;
}

double f(double x, double y) {
        double r26400 = y;
        double r26401 = -r26400;
        double r26402 = 2.0;
        double r26403 = fma(r26400, r26401, r26402);
        double r26404 = r26400 * r26403;
        double r26405 = 9.0;
        double r26406 = x;
        double r26407 = 4.0;
        double r26408 = pow(r26406, r26407);
        double r26409 = r26405 * r26408;
        double r26410 = fma(r26404, r26400, r26409);
        return r26410;
}

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(y \cdot \mathsf{fma}\left(y, -y, 2\right), y, 9 \cdot {x}^{4}\right)}\]
  3. Final simplification0

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

Reproduce

herbie shell --seed 2019235 +o rules:numerics
(FPCore (x y)
  :name "From Rump in a 1983 paper, rewritten"
  :precision binary64
  :pre (and (== x 10864) (== y 18817))
  (- (* 9 (pow x 4)) (* (* y y) (- (* y y) 2))))