Average Error: 52.0 → 52.0
Time: 7.3s
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 r40664 = 9.0;
        double r40665 = x;
        double r40666 = 4.0;
        double r40667 = pow(r40665, r40666);
        double r40668 = r40664 * r40667;
        double r40669 = y;
        double r40670 = pow(r40669, r40666);
        double r40671 = r40668 - r40670;
        double r40672 = 2.0;
        double r40673 = r40669 * r40669;
        double r40674 = r40672 * r40673;
        double r40675 = r40671 + r40674;
        return r40675;
}

double f(double x, double y) {
        double r40676 = 2.0;
        double r40677 = y;
        double r40678 = r40676 * r40677;
        double r40679 = 9.0;
        double r40680 = x;
        double r40681 = 4.0;
        double r40682 = pow(r40680, r40681);
        double r40683 = pow(r40677, r40681);
        double r40684 = -r40683;
        double r40685 = fma(r40679, r40682, r40684);
        double r40686 = 3.0;
        double r40687 = pow(r40685, r40686);
        double r40688 = cbrt(r40687);
        double r40689 = fma(r40678, r40677, r40688);
        return r40689;
}

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