Average Error: 52.0 → 52.0
Time: 7.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(\mathsf{fma}\left(9, {x}^{4}, -{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(9, {x}^{4}, -{y}^{4}\right)\right)}^{3}}\right)
double f(double x, double y) {
        double r87635 = 9.0;
        double r87636 = x;
        double r87637 = 4.0;
        double r87638 = pow(r87636, r87637);
        double r87639 = r87635 * r87638;
        double r87640 = y;
        double r87641 = pow(r87640, r87637);
        double r87642 = r87639 - r87641;
        double r87643 = 2.0;
        double r87644 = r87640 * r87640;
        double r87645 = r87643 * r87644;
        double r87646 = r87642 + r87645;
        return r87646;
}

double f(double x, double y) {
        double r87647 = 2.0;
        double r87648 = y;
        double r87649 = r87647 * r87648;
        double r87650 = 9.0;
        double r87651 = x;
        double r87652 = 4.0;
        double r87653 = pow(r87651, r87652);
        double r87654 = pow(r87648, r87652);
        double r87655 = -r87654;
        double r87656 = fma(r87650, r87653, r87655);
        double r87657 = 3.0;
        double r87658 = pow(r87656, r87657);
        double r87659 = cbrt(r87658);
        double r87660 = fma(r87649, r87648, r87659);
        return r87660;
}

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

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

Reproduce

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