Average Error: 62.0 → 0
Time: 8.8s
Precision: 64
\[x = 10864.0 \land y = 18817.0\]
\[9.0 \cdot {x}^{4.0} - \left(y \cdot y\right) \cdot \left(y \cdot y - 2.0\right)\]
\[\mathsf{fma}\left(2.0 - y \cdot y, y \cdot y, 9.0 \cdot {x}^{4.0}\right)\]
9.0 \cdot {x}^{4.0} - \left(y \cdot y\right) \cdot \left(y \cdot y - 2.0\right)
\mathsf{fma}\left(2.0 - y \cdot y, y \cdot y, 9.0 \cdot {x}^{4.0}\right)
double f(double x, double y) {
        double r1584658 = 9.0;
        double r1584659 = x;
        double r1584660 = 4.0;
        double r1584661 = pow(r1584659, r1584660);
        double r1584662 = r1584658 * r1584661;
        double r1584663 = y;
        double r1584664 = r1584663 * r1584663;
        double r1584665 = 2.0;
        double r1584666 = r1584664 - r1584665;
        double r1584667 = r1584664 * r1584666;
        double r1584668 = r1584662 - r1584667;
        return r1584668;
}

double f(double x, double y) {
        double r1584669 = 2.0;
        double r1584670 = y;
        double r1584671 = r1584670 * r1584670;
        double r1584672 = r1584669 - r1584671;
        double r1584673 = 9.0;
        double r1584674 = x;
        double r1584675 = 4.0;
        double r1584676 = pow(r1584674, r1584675);
        double r1584677 = r1584673 * r1584676;
        double r1584678 = fma(r1584672, r1584671, r1584677);
        return r1584678;
}

Error

Derivation

  1. Initial program 62.0

    \[9.0 \cdot {x}^{4.0} - \left(y \cdot y\right) \cdot \left(y \cdot y - 2.0\right)\]
  2. Simplified0

    \[\leadsto \color{blue}{\mathsf{fma}\left(2.0 - y \cdot y, y \cdot y, {x}^{4.0} \cdot 9.0\right)}\]
  3. Final simplification0

    \[\leadsto \mathsf{fma}\left(2.0 - y \cdot y, y \cdot y, 9.0 \cdot {x}^{4.0}\right)\]

Reproduce

herbie shell --seed 2019165 +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))))