Average Error: 62.0 → 0
Time: 3.4s
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 r27176 = 9.0;
        double r27177 = x;
        double r27178 = 4.0;
        double r27179 = pow(r27177, r27178);
        double r27180 = r27176 * r27179;
        double r27181 = y;
        double r27182 = r27181 * r27181;
        double r27183 = 2.0;
        double r27184 = r27182 - r27183;
        double r27185 = r27182 * r27184;
        double r27186 = r27180 - r27185;
        return r27186;
}

double f(double x, double y) {
        double r27187 = y;
        double r27188 = r27187 * r27187;
        double r27189 = 2.0;
        double r27190 = r27189 - r27188;
        double r27191 = 9.0;
        double r27192 = x;
        double r27193 = 4.0;
        double r27194 = pow(r27192, r27193);
        double r27195 = r27191 * r27194;
        double r27196 = fma(r27188, r27190, r27195);
        return r27196;
}

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