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 r48287 = 9.0;
        double r48288 = x;
        double r48289 = 4.0;
        double r48290 = pow(r48288, r48289);
        double r48291 = r48287 * r48290;
        double r48292 = y;
        double r48293 = r48292 * r48292;
        double r48294 = 2.0;
        double r48295 = r48293 - r48294;
        double r48296 = r48293 * r48295;
        double r48297 = r48291 - r48296;
        return r48297;
}

double f(double x, double y) {
        double r48298 = y;
        double r48299 = r48298 * r48298;
        double r48300 = 2.0;
        double r48301 = r48300 - r48299;
        double r48302 = 9.0;
        double r48303 = x;
        double r48304 = 4.0;
        double r48305 = pow(r48303, r48304);
        double r48306 = r48302 * r48305;
        double r48307 = fma(r48299, r48301, r48306);
        return r48307;
}

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