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 r9068 = 9.0;
        double r9069 = x;
        double r9070 = 4.0;
        double r9071 = pow(r9069, r9070);
        double r9072 = r9068 * r9071;
        double r9073 = y;
        double r9074 = r9073 * r9073;
        double r9075 = 2.0;
        double r9076 = r9074 - r9075;
        double r9077 = r9074 * r9076;
        double r9078 = r9072 - r9077;
        return r9078;
}

double f(double x, double y) {
        double r9079 = y;
        double r9080 = -r9079;
        double r9081 = 2.0;
        double r9082 = fma(r9079, r9080, r9081);
        double r9083 = r9079 * r9082;
        double r9084 = 9.0;
        double r9085 = x;
        double r9086 = 4.0;
        double r9087 = pow(r9085, r9086);
        double r9088 = r9084 * r9087;
        double r9089 = fma(r9083, r9079, r9088);
        return r9089;
}

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