Average Error: 62.0 → 0
Time: 3.7s
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 y, 2 - 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(y \cdot y, 2 - y \cdot y, 9 \cdot {x}^{4}\right)
double f(double x, double y) {
        double r32402 = 9.0;
        double r32403 = x;
        double r32404 = 4.0;
        double r32405 = pow(r32403, r32404);
        double r32406 = r32402 * r32405;
        double r32407 = y;
        double r32408 = r32407 * r32407;
        double r32409 = 2.0;
        double r32410 = r32408 - r32409;
        double r32411 = r32408 * r32410;
        double r32412 = r32406 - r32411;
        return r32412;
}

double f(double x, double y) {
        double r32413 = y;
        double r32414 = r32413 * r32413;
        double r32415 = 2.0;
        double r32416 = r32415 - r32414;
        double r32417 = 9.0;
        double r32418 = x;
        double r32419 = 4.0;
        double r32420 = pow(r32418, r32419);
        double r32421 = r32417 * r32420;
        double r32422 = fma(r32414, r32416, r32421);
        return r32422;
}

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

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

Reproduce

herbie shell --seed 2019194 +o rules:numerics
(FPCore (x y)
  :name "From Rump in a 1983 paper, rewritten"
  :pre (and (== x 10864.0) (== y 18817.0))
  (- (* 9.0 (pow x 4.0)) (* (* y y) (- (* y y) 2.0))))