Average Error: 62.0 → 0
Time: 7.2s
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 r1962727 = 9.0;
        double r1962728 = x;
        double r1962729 = 4.0;
        double r1962730 = pow(r1962728, r1962729);
        double r1962731 = r1962727 * r1962730;
        double r1962732 = y;
        double r1962733 = r1962732 * r1962732;
        double r1962734 = 2.0;
        double r1962735 = r1962733 - r1962734;
        double r1962736 = r1962733 * r1962735;
        double r1962737 = r1962731 - r1962736;
        return r1962737;
}

double f(double x, double y) {
        double r1962738 = 2.0;
        double r1962739 = y;
        double r1962740 = r1962739 * r1962739;
        double r1962741 = r1962738 - r1962740;
        double r1962742 = 9.0;
        double r1962743 = x;
        double r1962744 = 4.0;
        double r1962745 = pow(r1962743, r1962744);
        double r1962746 = r1962742 * r1962745;
        double r1962747 = fma(r1962741, r1962740, r1962746);
        return r1962747;
}

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

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

Reproduce

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