Average Error: 62.0 → 0
Time: 6.0s
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 r73385 = 9.0;
        double r73386 = x;
        double r73387 = 4.0;
        double r73388 = pow(r73386, r73387);
        double r73389 = r73385 * r73388;
        double r73390 = y;
        double r73391 = r73390 * r73390;
        double r73392 = 2.0;
        double r73393 = r73391 - r73392;
        double r73394 = r73391 * r73393;
        double r73395 = r73389 - r73394;
        return r73395;
}

double f(double x, double y) {
        double r73396 = y;
        double r73397 = -r73396;
        double r73398 = 2.0;
        double r73399 = fma(r73396, r73397, r73398);
        double r73400 = r73396 * r73399;
        double r73401 = 9.0;
        double r73402 = x;
        double r73403 = 4.0;
        double r73404 = pow(r73402, r73403);
        double r73405 = r73401 * r73404;
        double r73406 = fma(r73400, r73396, r73405);
        return r73406;
}

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 2019326 +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))))