Average Error: 62.0 → 0
Time: 3.2s
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 r46671 = 9.0;
        double r46672 = x;
        double r46673 = 4.0;
        double r46674 = pow(r46672, r46673);
        double r46675 = r46671 * r46674;
        double r46676 = y;
        double r46677 = r46676 * r46676;
        double r46678 = 2.0;
        double r46679 = r46677 - r46678;
        double r46680 = r46677 * r46679;
        double r46681 = r46675 - r46680;
        return r46681;
}

double f(double x, double y) {
        double r46682 = y;
        double r46683 = -r46682;
        double r46684 = 2.0;
        double r46685 = fma(r46682, r46683, r46684);
        double r46686 = r46682 * r46685;
        double r46687 = 9.0;
        double r46688 = x;
        double r46689 = 4.0;
        double r46690 = pow(r46688, r46689);
        double r46691 = r46687 * r46690;
        double r46692 = fma(r46686, r46682, r46691);
        return r46692;
}

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