Average Error: 62.0 → 0
Time: 6.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(y \cdot y, 2 - y \cdot y, {x}^{4} \cdot 9\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, {x}^{4} \cdot 9\right)
double f(double x, double y) {
        double r69441 = 9.0;
        double r69442 = x;
        double r69443 = 4.0;
        double r69444 = pow(r69442, r69443);
        double r69445 = r69441 * r69444;
        double r69446 = y;
        double r69447 = r69446 * r69446;
        double r69448 = 2.0;
        double r69449 = r69447 - r69448;
        double r69450 = r69447 * r69449;
        double r69451 = r69445 - r69450;
        return r69451;
}

double f(double x, double y) {
        double r69452 = y;
        double r69453 = r69452 * r69452;
        double r69454 = 2.0;
        double r69455 = r69454 - r69453;
        double r69456 = x;
        double r69457 = 4.0;
        double r69458 = pow(r69456, r69457);
        double r69459 = 9.0;
        double r69460 = r69458 * r69459;
        double r69461 = fma(r69453, r69455, r69460);
        return r69461;
}

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 \left(2 - y \cdot y\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(y \cdot y, 2 - y \cdot y, {x}^{4} \cdot 9\right)}\]
  5. Final simplification0

    \[\leadsto \mathsf{fma}\left(y \cdot y, 2 - y \cdot y, {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))))