Average Error: 62.0 → 0
Time: 4.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 y, 2 - y \cdot 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 y, 2 - y \cdot y, 9 \cdot {x}^{4}\right)
double f(double x, double y) {
        double r1655032 = 9.0;
        double r1655033 = x;
        double r1655034 = 4.0;
        double r1655035 = pow(r1655033, r1655034);
        double r1655036 = r1655032 * r1655035;
        double r1655037 = y;
        double r1655038 = r1655037 * r1655037;
        double r1655039 = 2.0;
        double r1655040 = r1655038 - r1655039;
        double r1655041 = r1655038 * r1655040;
        double r1655042 = r1655036 - r1655041;
        return r1655042;
}

double f(double x, double y) {
        double r1655043 = y;
        double r1655044 = r1655043 * r1655043;
        double r1655045 = 2.0;
        double r1655046 = r1655045 - r1655044;
        double r1655047 = 9.0;
        double r1655048 = x;
        double r1655049 = 4.0;
        double r1655050 = pow(r1655048, r1655049);
        double r1655051 = r1655047 * r1655050;
        double r1655052 = fma(r1655044, r1655046, r1655051);
        return r1655052;
}

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 y, 2 - y \cdot y, {x}^{4} \cdot 9\right)}\]
  3. Final simplification0

    \[\leadsto \mathsf{fma}\left(y \cdot y, 2 - y \cdot y, 9 \cdot {x}^{4}\right)\]

Reproduce

herbie shell --seed 2019174 +o rules:numerics
(FPCore (x y)
  :name "From Rump in a 1983 paper, rewritten"
  :pre (and (== x 10864.0) (== y 18817.0))
  (- (* 9.0 (pow x 4.0)) (* (* y y) (- (* y y) 2.0))))