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 r26137 = 9.0;
        double r26138 = x;
        double r26139 = 4.0;
        double r26140 = pow(r26138, r26139);
        double r26141 = r26137 * r26140;
        double r26142 = y;
        double r26143 = r26142 * r26142;
        double r26144 = 2.0;
        double r26145 = r26143 - r26144;
        double r26146 = r26143 * r26145;
        double r26147 = r26141 - r26146;
        return r26147;
}

double f(double x, double y) {
        double r26148 = y;
        double r26149 = -r26148;
        double r26150 = 2.0;
        double r26151 = fma(r26148, r26149, r26150);
        double r26152 = r26148 * r26151;
        double r26153 = 9.0;
        double r26154 = x;
        double r26155 = 4.0;
        double r26156 = pow(r26154, r26155);
        double r26157 = r26153 * r26156;
        double r26158 = fma(r26152, r26148, r26157);
        return r26158;
}

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