Average Error: 62.0 → 0
Time: 3.8s
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 y, 2 - y \cdot 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 y, 2 - y \cdot y, 9 \cdot {x}^{4}\right)
double f(double x, double y) {
        double r1898261 = 9.0;
        double r1898262 = x;
        double r1898263 = 4.0;
        double r1898264 = pow(r1898262, r1898263);
        double r1898265 = r1898261 * r1898264;
        double r1898266 = y;
        double r1898267 = r1898266 * r1898266;
        double r1898268 = 2.0;
        double r1898269 = r1898267 - r1898268;
        double r1898270 = r1898267 * r1898269;
        double r1898271 = r1898265 - r1898270;
        return r1898271;
}

double f(double x, double y) {
        double r1898272 = y;
        double r1898273 = r1898272 * r1898272;
        double r1898274 = 2.0;
        double r1898275 = r1898274 - r1898273;
        double r1898276 = 9.0;
        double r1898277 = x;
        double r1898278 = 4.0;
        double r1898279 = pow(r1898277, r1898278);
        double r1898280 = r1898276 * r1898279;
        double r1898281 = fma(r1898273, r1898275, r1898280);
        return r1898281;
}

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 y, 2 - y \cdot y, {x}^{4} \cdot 9\right)}\]
  3. Final simplification0

    \[\leadsto \mathsf{fma}\left(y \cdot y, 2 - y \cdot y, 9 \cdot {x}^{4}\right)\]

Reproduce

herbie shell --seed 2019192 +o rules:numerics
(FPCore (x y)
  :name "From Rump in a 1983 paper, rewritten"
  :pre (and (== x 10864.0) (== y 18817.0))
  (- (* 9.0 (pow x 4.0)) (* (* y y) (- (* y y) 2.0))))