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 r3052989 = 9.0;
        double r3052990 = x;
        double r3052991 = 4.0;
        double r3052992 = pow(r3052990, r3052991);
        double r3052993 = r3052989 * r3052992;
        double r3052994 = y;
        double r3052995 = r3052994 * r3052994;
        double r3052996 = 2.0;
        double r3052997 = r3052995 - r3052996;
        double r3052998 = r3052995 * r3052997;
        double r3052999 = r3052993 - r3052998;
        return r3052999;
}

double f(double x, double y) {
        double r3053000 = y;
        double r3053001 = r3053000 * r3053000;
        double r3053002 = 2.0;
        double r3053003 = r3053002 - r3053001;
        double r3053004 = 9.0;
        double r3053005 = x;
        double r3053006 = 4.0;
        double r3053007 = pow(r3053005, r3053006);
        double r3053008 = r3053004 * r3053007;
        double r3053009 = fma(r3053001, r3053003, r3053008);
        return r3053009;
}

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