Average Error: 62.0 → 0
Time: 7.8s
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(2 - y \cdot y, 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(2 - y \cdot y, y \cdot y, 9 \cdot {x}^{4}\right)
double f(double x, double y) {
        double r2968032 = 9.0;
        double r2968033 = x;
        double r2968034 = 4.0;
        double r2968035 = pow(r2968033, r2968034);
        double r2968036 = r2968032 * r2968035;
        double r2968037 = y;
        double r2968038 = r2968037 * r2968037;
        double r2968039 = 2.0;
        double r2968040 = r2968038 - r2968039;
        double r2968041 = r2968038 * r2968040;
        double r2968042 = r2968036 - r2968041;
        return r2968042;
}

double f(double x, double y) {
        double r2968043 = 2.0;
        double r2968044 = y;
        double r2968045 = r2968044 * r2968044;
        double r2968046 = r2968043 - r2968045;
        double r2968047 = 9.0;
        double r2968048 = x;
        double r2968049 = 4.0;
        double r2968050 = pow(r2968048, r2968049);
        double r2968051 = r2968047 * r2968050;
        double r2968052 = fma(r2968046, r2968045, r2968051);
        return r2968052;
}

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

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

Reproduce

herbie shell --seed 2019168 +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))))