Average Error: 62.0 → 0
Time: 6.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 r85565 = 9.0;
        double r85566 = x;
        double r85567 = 4.0;
        double r85568 = pow(r85566, r85567);
        double r85569 = r85565 * r85568;
        double r85570 = y;
        double r85571 = r85570 * r85570;
        double r85572 = 2.0;
        double r85573 = r85571 - r85572;
        double r85574 = r85571 * r85573;
        double r85575 = r85569 - r85574;
        return r85575;
}

double f(double x, double y) {
        double r85576 = y;
        double r85577 = -r85576;
        double r85578 = 2.0;
        double r85579 = fma(r85576, r85577, r85578);
        double r85580 = r85576 * r85579;
        double r85581 = 9.0;
        double r85582 = x;
        double r85583 = 4.0;
        double r85584 = pow(r85582, r85583);
        double r85585 = r85581 * r85584;
        double r85586 = fma(r85580, r85576, r85585);
        return r85586;
}

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