Average Error: 62.0 → 0
Time: 4.0s
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(\mathsf{fma}\left(y, -y, 2\right), {y}^{2}, {x}^{4} \cdot 9\right)\]
9 \cdot {x}^{4} - \left(y \cdot y\right) \cdot \left(y \cdot y - 2\right)
\mathsf{fma}\left(\mathsf{fma}\left(y, -y, 2\right), {y}^{2}, {x}^{4} \cdot 9\right)
double f(double x, double y) {
        double r44253 = 9.0;
        double r44254 = x;
        double r44255 = 4.0;
        double r44256 = pow(r44254, r44255);
        double r44257 = r44253 * r44256;
        double r44258 = y;
        double r44259 = r44258 * r44258;
        double r44260 = 2.0;
        double r44261 = r44259 - r44260;
        double r44262 = r44259 * r44261;
        double r44263 = r44257 - r44262;
        return r44263;
}

double f(double x, double y) {
        double r44264 = y;
        double r44265 = -r44264;
        double r44266 = 2.0;
        double r44267 = fma(r44264, r44265, r44266);
        double r44268 = 2.0;
        double r44269 = pow(r44264, r44268);
        double r44270 = x;
        double r44271 = 4.0;
        double r44272 = pow(r44270, r44271);
        double r44273 = 9.0;
        double r44274 = r44272 * r44273;
        double r44275 = fma(r44267, r44269, r44274);
        return r44275;
}

Error

Derivation

  1. Initial program 62.0

    \[9 \cdot {x}^{4} - \left(y \cdot y\right) \cdot \left(y \cdot y - 2\right)\]
  2. Simplified62.0

    \[\leadsto \color{blue}{\mathsf{fma}\left({x}^{4}, 9, \left(y \cdot y\right) \cdot \mathsf{fma}\left(y, -y, 2\right)\right)}\]
  3. Taylor expanded around -inf 64.0

    \[\leadsto \color{blue}{\left(9 \cdot e^{4 \cdot \left(\log -1 - \log \left(\frac{-1}{x}\right)\right)} + 2 \cdot {y}^{2}\right) - {y}^{4}}\]
  4. Simplified0

    \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(y, -y, 2\right), {y}^{2}, {x}^{4} \cdot 9\right)}\]
  5. Final simplification0

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

Reproduce

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