Average Error: 62.0 → 0
Time: 4.9s
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 r39057 = 9.0;
        double r39058 = x;
        double r39059 = 4.0;
        double r39060 = pow(r39058, r39059);
        double r39061 = r39057 * r39060;
        double r39062 = y;
        double r39063 = r39062 * r39062;
        double r39064 = 2.0;
        double r39065 = r39063 - r39064;
        double r39066 = r39063 * r39065;
        double r39067 = r39061 - r39066;
        return r39067;
}

double f(double x, double y) {
        double r39068 = y;
        double r39069 = -r39068;
        double r39070 = 2.0;
        double r39071 = fma(r39068, r39069, r39070);
        double r39072 = r39068 * r39071;
        double r39073 = 9.0;
        double r39074 = x;
        double r39075 = 4.0;
        double r39076 = pow(r39074, r39075);
        double r39077 = r39073 * r39076;
        double r39078 = fma(r39072, r39068, r39077);
        return r39078;
}

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