Average Error: 62.0 → 0
Time: 5.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 \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 r87824 = 9.0;
        double r87825 = x;
        double r87826 = 4.0;
        double r87827 = pow(r87825, r87826);
        double r87828 = r87824 * r87827;
        double r87829 = y;
        double r87830 = r87829 * r87829;
        double r87831 = 2.0;
        double r87832 = r87830 - r87831;
        double r87833 = r87830 * r87832;
        double r87834 = r87828 - r87833;
        return r87834;
}

double f(double x, double y) {
        double r87835 = y;
        double r87836 = -r87835;
        double r87837 = 2.0;
        double r87838 = fma(r87835, r87836, r87837);
        double r87839 = r87835 * r87838;
        double r87840 = 9.0;
        double r87841 = x;
        double r87842 = 4.0;
        double r87843 = pow(r87841, r87842);
        double r87844 = r87840 * r87843;
        double r87845 = fma(r87839, r87835, r87844);
        return r87845;
}

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