Average Error: 62.0 → 0
Time: 5.9s
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 r29050 = 9.0;
        double r29051 = x;
        double r29052 = 4.0;
        double r29053 = pow(r29051, r29052);
        double r29054 = r29050 * r29053;
        double r29055 = y;
        double r29056 = r29055 * r29055;
        double r29057 = 2.0;
        double r29058 = r29056 - r29057;
        double r29059 = r29056 * r29058;
        double r29060 = r29054 - r29059;
        return r29060;
}

double f(double x, double y) {
        double r29061 = y;
        double r29062 = -r29061;
        double r29063 = 2.0;
        double r29064 = fma(r29061, r29062, r29063);
        double r29065 = r29061 * r29064;
        double r29066 = 9.0;
        double r29067 = x;
        double r29068 = 4.0;
        double r29069 = pow(r29067, r29068);
        double r29070 = r29066 * r29069;
        double r29071 = fma(r29065, r29061, r29070);
        return r29071;
}

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