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 r28285 = 9.0;
        double r28286 = x;
        double r28287 = 4.0;
        double r28288 = pow(r28286, r28287);
        double r28289 = r28285 * r28288;
        double r28290 = y;
        double r28291 = r28290 * r28290;
        double r28292 = 2.0;
        double r28293 = r28291 - r28292;
        double r28294 = r28291 * r28293;
        double r28295 = r28289 - r28294;
        return r28295;
}

double f(double x, double y) {
        double r28296 = y;
        double r28297 = -r28296;
        double r28298 = 2.0;
        double r28299 = fma(r28296, r28297, r28298);
        double r28300 = r28296 * r28299;
        double r28301 = 9.0;
        double r28302 = x;
        double r28303 = 4.0;
        double r28304 = pow(r28302, r28303);
        double r28305 = r28301 * r28304;
        double r28306 = fma(r28300, r28296, r28305);
        return r28306;
}

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