Average Error: 52.0 → 52.0
Time: 7.2s
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(\mathsf{fma}\left({x}^{4}, 9, -{y}^{4}\right)\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(\mathsf{fma}\left({x}^{4}, 9, -{y}^{4}\right)\right)}^{3}}\right)
double f(double x, double y) {
        double r38646 = 9.0;
        double r38647 = x;
        double r38648 = 4.0;
        double r38649 = pow(r38647, r38648);
        double r38650 = r38646 * r38649;
        double r38651 = y;
        double r38652 = pow(r38651, r38648);
        double r38653 = r38650 - r38652;
        double r38654 = 2.0;
        double r38655 = r38651 * r38651;
        double r38656 = r38654 * r38655;
        double r38657 = r38653 + r38656;
        return r38657;
}

double f(double x, double y) {
        double r38658 = 2.0;
        double r38659 = y;
        double r38660 = r38658 * r38659;
        double r38661 = x;
        double r38662 = 4.0;
        double r38663 = pow(r38661, r38662);
        double r38664 = 9.0;
        double r38665 = pow(r38659, r38662);
        double r38666 = -r38665;
        double r38667 = fma(r38663, r38664, r38666);
        double r38668 = 3.0;
        double r38669 = pow(r38667, r38668);
        double r38670 = cbrt(r38669);
        double r38671 = fma(r38660, r38659, r38670);
        return r38671;
}

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(\mathsf{fma}\left({x}^{4}, 9, -{y}^{4}\right)\right)}^{3}}}\right)\]
  6. Final simplification52.0

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

Reproduce

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