Average Error: 62.0 → 0
Time: 3.6s
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 \mathsf{fma}\left(y, -y, 2\right), 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 \mathsf{fma}\left(y, -y, 2\right), y, 9 \cdot {x}^{4}\right)
double f(double x, double y) {
        double r56735 = 9.0;
        double r56736 = x;
        double r56737 = 4.0;
        double r56738 = pow(r56736, r56737);
        double r56739 = r56735 * r56738;
        double r56740 = y;
        double r56741 = r56740 * r56740;
        double r56742 = 2.0;
        double r56743 = r56741 - r56742;
        double r56744 = r56741 * r56743;
        double r56745 = r56739 - r56744;
        return r56745;
}

double f(double x, double y) {
        double r56746 = y;
        double r56747 = -r56746;
        double r56748 = 2.0;
        double r56749 = fma(r56746, r56747, r56748);
        double r56750 = r56746 * r56749;
        double r56751 = 9.0;
        double r56752 = x;
        double r56753 = 4.0;
        double r56754 = pow(r56752, r56753);
        double r56755 = r56751 * r56754;
        double r56756 = fma(r56750, r56746, r56755);
        return r56756;
}

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

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

Reproduce

herbie shell --seed 2019351 +o rules:numerics
(FPCore (x y)
  :name "From Rump in a 1983 paper, rewritten"
  :precision binary64
  :pre (and (== x 10864) (== y 18817))
  (- (* 9 (pow x 4)) (* (* y y) (- (* y y) 2))))