Average Error: 62.0 → 0
Time: 6.3s
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 r28727 = 9.0;
        double r28728 = x;
        double r28729 = 4.0;
        double r28730 = pow(r28728, r28729);
        double r28731 = r28727 * r28730;
        double r28732 = y;
        double r28733 = r28732 * r28732;
        double r28734 = 2.0;
        double r28735 = r28733 - r28734;
        double r28736 = r28733 * r28735;
        double r28737 = r28731 - r28736;
        return r28737;
}

double f(double x, double y) {
        double r28738 = y;
        double r28739 = -r28738;
        double r28740 = 2.0;
        double r28741 = fma(r28738, r28739, r28740);
        double r28742 = r28738 * r28741;
        double r28743 = 9.0;
        double r28744 = x;
        double r28745 = 4.0;
        double r28746 = pow(r28744, r28745);
        double r28747 = r28743 * r28746;
        double r28748 = fma(r28742, r28738, r28747);
        return r28748;
}

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