Average Error: 62.0 → 0
Time: 6.6s
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 r87767 = 9.0;
        double r87768 = x;
        double r87769 = 4.0;
        double r87770 = pow(r87768, r87769);
        double r87771 = r87767 * r87770;
        double r87772 = y;
        double r87773 = r87772 * r87772;
        double r87774 = 2.0;
        double r87775 = r87773 - r87774;
        double r87776 = r87773 * r87775;
        double r87777 = r87771 - r87776;
        return r87777;
}

double f(double x, double y) {
        double r87778 = y;
        double r87779 = -r87778;
        double r87780 = 2.0;
        double r87781 = fma(r87778, r87779, r87780);
        double r87782 = r87778 * r87781;
        double r87783 = 9.0;
        double r87784 = x;
        double r87785 = 4.0;
        double r87786 = pow(r87784, r87785);
        double r87787 = r87783 * r87786;
        double r87788 = fma(r87782, r87778, r87787);
        return r87788;
}

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