Average Error: 62.0 → 0
Time: 4.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 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 r25325 = 9.0;
        double r25326 = x;
        double r25327 = 4.0;
        double r25328 = pow(r25326, r25327);
        double r25329 = r25325 * r25328;
        double r25330 = y;
        double r25331 = r25330 * r25330;
        double r25332 = 2.0;
        double r25333 = r25331 - r25332;
        double r25334 = r25331 * r25333;
        double r25335 = r25329 - r25334;
        return r25335;
}

double f(double x, double y) {
        double r25336 = y;
        double r25337 = r25336 * r25336;
        double r25338 = 2.0;
        double r25339 = r25338 - r25337;
        double r25340 = 9.0;
        double r25341 = x;
        double r25342 = 4.0;
        double r25343 = pow(r25341, r25342);
        double r25344 = r25340 * r25343;
        double r25345 = fma(r25337, r25339, r25344);
        return r25345;
}

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