Average Error: 52.0 → 52.0
Time: 2.5s
Precision: 64
\[x = 10864 \land y = 18817\]
\[\left(9 \cdot {x}^{4} - {y}^{4}\right) + 2 \cdot \left(y \cdot y\right)\]
\[\mathsf{fma}\left(2 \cdot y, y, \sqrt[3]{{\left(9 \cdot {x}^{4} - {y}^{4}\right)}^{3}}\right)\]
\left(9 \cdot {x}^{4} - {y}^{4}\right) + 2 \cdot \left(y \cdot y\right)
\mathsf{fma}\left(2 \cdot y, y, \sqrt[3]{{\left(9 \cdot {x}^{4} - {y}^{4}\right)}^{3}}\right)
double f(double x, double y) {
        double r57471 = 9.0;
        double r57472 = x;
        double r57473 = 4.0;
        double r57474 = pow(r57472, r57473);
        double r57475 = r57471 * r57474;
        double r57476 = y;
        double r57477 = pow(r57476, r57473);
        double r57478 = r57475 - r57477;
        double r57479 = 2.0;
        double r57480 = r57476 * r57476;
        double r57481 = r57479 * r57480;
        double r57482 = r57478 + r57481;
        return r57482;
}

double f(double x, double y) {
        double r57483 = 2.0;
        double r57484 = y;
        double r57485 = r57483 * r57484;
        double r57486 = 9.0;
        double r57487 = x;
        double r57488 = 4.0;
        double r57489 = pow(r57487, r57488);
        double r57490 = r57486 * r57489;
        double r57491 = pow(r57484, r57488);
        double r57492 = r57490 - r57491;
        double r57493 = 3.0;
        double r57494 = pow(r57492, r57493);
        double r57495 = cbrt(r57494);
        double r57496 = fma(r57485, r57484, r57495);
        return r57496;
}

Error

Derivation

  1. Initial program 52.0

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

    \[\leadsto \color{blue}{\mathsf{fma}\left(2 \cdot y, y, 9 \cdot {x}^{4} - {y}^{4}\right)}\]
  3. Using strategy rm
  4. Applied add-cbrt-cube52.0

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

    \[\leadsto \mathsf{fma}\left(2 \cdot y, y, \sqrt[3]{\color{blue}{{\left(9 \cdot {x}^{4} - {y}^{4}\right)}^{3}}}\right)\]
  6. Final simplification52.0

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

Reproduce

herbie shell --seed 2019356 +o rules:numerics
(FPCore (x y)
  :name "From Rump in a 1983 paper"
  :precision binary64
  :pre (and (== x 10864) (== y 18817))
  (+ (- (* 9 (pow x 4)) (pow y 4)) (* 2 (* y y))))