Average Error: 62.0 → 0
Time: 6.1s
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 r73356 = 9.0;
        double r73357 = x;
        double r73358 = 4.0;
        double r73359 = pow(r73357, r73358);
        double r73360 = r73356 * r73359;
        double r73361 = y;
        double r73362 = r73361 * r73361;
        double r73363 = 2.0;
        double r73364 = r73362 - r73363;
        double r73365 = r73362 * r73364;
        double r73366 = r73360 - r73365;
        return r73366;
}

double f(double x, double y) {
        double r73367 = y;
        double r73368 = -r73367;
        double r73369 = 2.0;
        double r73370 = fma(r73367, r73368, r73369);
        double r73371 = r73367 * r73370;
        double r73372 = 9.0;
        double r73373 = x;
        double r73374 = 4.0;
        double r73375 = pow(r73373, r73374);
        double r73376 = r73372 * r73375;
        double r73377 = fma(r73371, r73367, r73376);
        return r73377;
}

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