Average Error: 62.0 → 0
Time: 6.4s
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 r29088 = 9.0;
        double r29089 = x;
        double r29090 = 4.0;
        double r29091 = pow(r29089, r29090);
        double r29092 = r29088 * r29091;
        double r29093 = y;
        double r29094 = r29093 * r29093;
        double r29095 = 2.0;
        double r29096 = r29094 - r29095;
        double r29097 = r29094 * r29096;
        double r29098 = r29092 - r29097;
        return r29098;
}

double f(double x, double y) {
        double r29099 = y;
        double r29100 = -r29099;
        double r29101 = 2.0;
        double r29102 = fma(r29099, r29100, r29101);
        double r29103 = r29099 * r29102;
        double r29104 = 9.0;
        double r29105 = x;
        double r29106 = 4.0;
        double r29107 = pow(r29105, r29106);
        double r29108 = r29104 * r29107;
        double r29109 = fma(r29103, r29099, r29108);
        return r29109;
}

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