Average Error: 62.0 → 0
Time: 3.3s
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 r32878 = 9.0;
        double r32879 = x;
        double r32880 = 4.0;
        double r32881 = pow(r32879, r32880);
        double r32882 = r32878 * r32881;
        double r32883 = y;
        double r32884 = r32883 * r32883;
        double r32885 = 2.0;
        double r32886 = r32884 - r32885;
        double r32887 = r32884 * r32886;
        double r32888 = r32882 - r32887;
        return r32888;
}

double f(double x, double y) {
        double r32889 = y;
        double r32890 = -r32889;
        double r32891 = 2.0;
        double r32892 = fma(r32889, r32890, r32891);
        double r32893 = r32889 * r32892;
        double r32894 = 9.0;
        double r32895 = x;
        double r32896 = 4.0;
        double r32897 = pow(r32895, r32896);
        double r32898 = r32894 * r32897;
        double r32899 = fma(r32893, r32889, r32898);
        return r32899;
}

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