Average Error: 62.0 → 0
Time: 4.9s
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(2 - y \cdot y, 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(2 - y \cdot y, y \cdot y, 9 \cdot {x}^{4}\right)
double f(double x, double y) {
        double r1918401 = 9.0;
        double r1918402 = x;
        double r1918403 = 4.0;
        double r1918404 = pow(r1918402, r1918403);
        double r1918405 = r1918401 * r1918404;
        double r1918406 = y;
        double r1918407 = r1918406 * r1918406;
        double r1918408 = 2.0;
        double r1918409 = r1918407 - r1918408;
        double r1918410 = r1918407 * r1918409;
        double r1918411 = r1918405 - r1918410;
        return r1918411;
}

double f(double x, double y) {
        double r1918412 = 2.0;
        double r1918413 = y;
        double r1918414 = r1918413 * r1918413;
        double r1918415 = r1918412 - r1918414;
        double r1918416 = 9.0;
        double r1918417 = x;
        double r1918418 = 4.0;
        double r1918419 = pow(r1918417, r1918418);
        double r1918420 = r1918416 * r1918419;
        double r1918421 = fma(r1918415, r1918414, r1918420);
        return r1918421;
}

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

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

Reproduce

herbie shell --seed 2019170 +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))))