Average Error: 52.0 → 52.0
Time: 7.9s
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 r37556 = 9.0;
        double r37557 = x;
        double r37558 = 4.0;
        double r37559 = pow(r37557, r37558);
        double r37560 = r37556 * r37559;
        double r37561 = y;
        double r37562 = pow(r37561, r37558);
        double r37563 = r37560 - r37562;
        double r37564 = 2.0;
        double r37565 = r37561 * r37561;
        double r37566 = r37564 * r37565;
        double r37567 = r37563 + r37566;
        return r37567;
}

double f(double x, double y) {
        double r37568 = 2.0;
        double r37569 = y;
        double r37570 = r37568 * r37569;
        double r37571 = 9.0;
        double r37572 = x;
        double r37573 = 4.0;
        double r37574 = pow(r37572, r37573);
        double r37575 = pow(r37569, r37573);
        double r37576 = -r37575;
        double r37577 = fma(r37571, r37574, r37576);
        double r37578 = 3.0;
        double r37579 = pow(r37577, r37578);
        double r37580 = cbrt(r37579);
        double r37581 = fma(r37570, r37569, r37580);
        return r37581;
}

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