Average Error: 62.0 → 0
Time: 4.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(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 r1750147 = 9.0;
        double r1750148 = x;
        double r1750149 = 4.0;
        double r1750150 = pow(r1750148, r1750149);
        double r1750151 = r1750147 * r1750150;
        double r1750152 = y;
        double r1750153 = r1750152 * r1750152;
        double r1750154 = 2.0;
        double r1750155 = r1750153 - r1750154;
        double r1750156 = r1750153 * r1750155;
        double r1750157 = r1750151 - r1750156;
        return r1750157;
}

double f(double x, double y) {
        double r1750158 = 2.0;
        double r1750159 = y;
        double r1750160 = r1750159 * r1750159;
        double r1750161 = r1750158 - r1750160;
        double r1750162 = 9.0;
        double r1750163 = x;
        double r1750164 = 4.0;
        double r1750165 = pow(r1750163, r1750164);
        double r1750166 = r1750162 * r1750165;
        double r1750167 = fma(r1750161, r1750160, r1750166);
        return r1750167;
}

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