Average Error: 62.0 → 0
Time: 1.1s
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 r71487 = 9.0;
        double r71488 = x;
        double r71489 = 4.0;
        double r71490 = pow(r71488, r71489);
        double r71491 = r71487 * r71490;
        double r71492 = y;
        double r71493 = r71492 * r71492;
        double r71494 = 2.0;
        double r71495 = r71493 - r71494;
        double r71496 = r71493 * r71495;
        double r71497 = r71491 - r71496;
        return r71497;
}

double f(double x, double y) {
        double r71498 = 2.0;
        double r71499 = y;
        double r71500 = r71499 * r71499;
        double r71501 = r71498 - r71500;
        double r71502 = 9.0;
        double r71503 = x;
        double r71504 = 4.0;
        double r71505 = pow(r71503, r71504);
        double r71506 = r71502 * r71505;
        double r71507 = fma(r71501, r71500, r71506);
        return r71507;
}

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