Average Error: 62.0 → 0
Time: 6.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 r9024 = 9.0;
        double r9025 = x;
        double r9026 = 4.0;
        double r9027 = pow(r9025, r9026);
        double r9028 = r9024 * r9027;
        double r9029 = y;
        double r9030 = r9029 * r9029;
        double r9031 = 2.0;
        double r9032 = r9030 - r9031;
        double r9033 = r9030 * r9032;
        double r9034 = r9028 - r9033;
        return r9034;
}

double f(double x, double y) {
        double r9035 = y;
        double r9036 = -r9035;
        double r9037 = 2.0;
        double r9038 = fma(r9035, r9036, r9037);
        double r9039 = r9035 * r9038;
        double r9040 = 9.0;
        double r9041 = x;
        double r9042 = 4.0;
        double r9043 = pow(r9041, r9042);
        double r9044 = r9040 * r9043;
        double r9045 = fma(r9039, r9035, r9044);
        return r9045;
}

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