Average Error: 62.0 → 0
Time: 5.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(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 r50305 = 9.0;
        double r50306 = x;
        double r50307 = 4.0;
        double r50308 = pow(r50306, r50307);
        double r50309 = r50305 * r50308;
        double r50310 = y;
        double r50311 = r50310 * r50310;
        double r50312 = 2.0;
        double r50313 = r50311 - r50312;
        double r50314 = r50311 * r50313;
        double r50315 = r50309 - r50314;
        return r50315;
}

double f(double x, double y) {
        double r50316 = y;
        double r50317 = -r50316;
        double r50318 = 2.0;
        double r50319 = fma(r50316, r50317, r50318);
        double r50320 = r50316 * r50319;
        double r50321 = 9.0;
        double r50322 = x;
        double r50323 = 4.0;
        double r50324 = pow(r50322, r50323);
        double r50325 = r50321 * r50324;
        double r50326 = fma(r50320, r50316, r50325);
        return r50326;
}

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