Average Error: 62.0 → 0
Time: 4.1s
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 r60432 = 9.0;
        double r60433 = x;
        double r60434 = 4.0;
        double r60435 = pow(r60433, r60434);
        double r60436 = r60432 * r60435;
        double r60437 = y;
        double r60438 = r60437 * r60437;
        double r60439 = 2.0;
        double r60440 = r60438 - r60439;
        double r60441 = r60438 * r60440;
        double r60442 = r60436 - r60441;
        return r60442;
}

double f(double x, double y) {
        double r60443 = y;
        double r60444 = -r60443;
        double r60445 = 2.0;
        double r60446 = fma(r60443, r60444, r60445);
        double r60447 = 2.0;
        double r60448 = pow(r60443, r60447);
        double r60449 = x;
        double r60450 = 4.0;
        double r60451 = pow(r60449, r60450);
        double r60452 = 9.0;
        double r60453 = r60451 * r60452;
        double r60454 = fma(r60446, r60448, r60453);
        return r60454;
}

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