Average Error: 62.0 → 0
Time: 3.5s
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 r25757 = 9.0;
        double r25758 = x;
        double r25759 = 4.0;
        double r25760 = pow(r25758, r25759);
        double r25761 = r25757 * r25760;
        double r25762 = y;
        double r25763 = r25762 * r25762;
        double r25764 = 2.0;
        double r25765 = r25763 - r25764;
        double r25766 = r25763 * r25765;
        double r25767 = r25761 - r25766;
        return r25767;
}

double f(double x, double y) {
        double r25768 = y;
        double r25769 = -r25768;
        double r25770 = 2.0;
        double r25771 = fma(r25768, r25769, r25770);
        double r25772 = r25768 * r25771;
        double r25773 = 9.0;
        double r25774 = x;
        double r25775 = 4.0;
        double r25776 = pow(r25774, r25775);
        double r25777 = r25773 * r25776;
        double r25778 = fma(r25772, r25768, r25777);
        return r25778;
}

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