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 r1658584 = 9.0;
        double r1658585 = x;
        double r1658586 = 4.0;
        double r1658587 = pow(r1658585, r1658586);
        double r1658588 = r1658584 * r1658587;
        double r1658589 = y;
        double r1658590 = r1658589 * r1658589;
        double r1658591 = 2.0;
        double r1658592 = r1658590 - r1658591;
        double r1658593 = r1658590 * r1658592;
        double r1658594 = r1658588 - r1658593;
        return r1658594;
}

double f(double x, double y) {
        double r1658595 = y;
        double r1658596 = r1658595 * r1658595;
        double r1658597 = 2.0;
        double r1658598 = r1658597 - r1658596;
        double r1658599 = 9.0;
        double r1658600 = x;
        double r1658601 = 4.0;
        double r1658602 = pow(r1658600, r1658601);
        double r1658603 = r1658599 * r1658602;
        double r1658604 = fma(r1658596, r1658598, r1658603);
        return r1658604;
}

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