Average Error: 62.0 → 0
Time: 3.0s
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 r38891 = 9.0;
        double r38892 = x;
        double r38893 = 4.0;
        double r38894 = pow(r38892, r38893);
        double r38895 = r38891 * r38894;
        double r38896 = y;
        double r38897 = r38896 * r38896;
        double r38898 = 2.0;
        double r38899 = r38897 - r38898;
        double r38900 = r38897 * r38899;
        double r38901 = r38895 - r38900;
        return r38901;
}

double f(double x, double y) {
        double r38902 = y;
        double r38903 = -r38902;
        double r38904 = 2.0;
        double r38905 = fma(r38902, r38903, r38904);
        double r38906 = r38902 * r38905;
        double r38907 = 9.0;
        double r38908 = x;
        double r38909 = 4.0;
        double r38910 = pow(r38908, r38909);
        double r38911 = r38907 * r38910;
        double r38912 = fma(r38906, r38902, r38911);
        return r38912;
}

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