Average Error: 52.0 → 52.0
Time: 11.7s
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 r52640 = 9.0;
        double r52641 = x;
        double r52642 = 4.0;
        double r52643 = pow(r52641, r52642);
        double r52644 = r52640 * r52643;
        double r52645 = y;
        double r52646 = pow(r52645, r52642);
        double r52647 = r52644 - r52646;
        double r52648 = 2.0;
        double r52649 = r52645 * r52645;
        double r52650 = r52648 * r52649;
        double r52651 = r52647 + r52650;
        return r52651;
}

double f(double x, double y) {
        double r52652 = 2.0;
        double r52653 = y;
        double r52654 = r52652 * r52653;
        double r52655 = x;
        double r52656 = 4.0;
        double r52657 = pow(r52655, r52656);
        double r52658 = 9.0;
        double r52659 = pow(r52653, r52656);
        double r52660 = -r52659;
        double r52661 = fma(r52657, r52658, r52660);
        double r52662 = 3.0;
        double r52663 = pow(r52661, r52662);
        double r52664 = cbrt(r52663);
        double r52665 = fma(r52654, r52653, r52664);
        return r52665;
}

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