Average Error: 62.0 → 0
Time: 4.2s
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 r1563125 = 9.0;
        double r1563126 = x;
        double r1563127 = 4.0;
        double r1563128 = pow(r1563126, r1563127);
        double r1563129 = r1563125 * r1563128;
        double r1563130 = y;
        double r1563131 = r1563130 * r1563130;
        double r1563132 = 2.0;
        double r1563133 = r1563131 - r1563132;
        double r1563134 = r1563131 * r1563133;
        double r1563135 = r1563129 - r1563134;
        return r1563135;
}

double f(double x, double y) {
        double r1563136 = y;
        double r1563137 = r1563136 * r1563136;
        double r1563138 = 2.0;
        double r1563139 = r1563138 - r1563137;
        double r1563140 = 9.0;
        double r1563141 = x;
        double r1563142 = 4.0;
        double r1563143 = pow(r1563141, r1563142);
        double r1563144 = r1563140 * r1563143;
        double r1563145 = fma(r1563137, r1563139, r1563144);
        return r1563145;
}

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