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 r45904 = 9.0;
        double r45905 = x;
        double r45906 = 4.0;
        double r45907 = pow(r45905, r45906);
        double r45908 = r45904 * r45907;
        double r45909 = y;
        double r45910 = pow(r45909, r45906);
        double r45911 = r45908 - r45910;
        double r45912 = 2.0;
        double r45913 = r45909 * r45909;
        double r45914 = r45912 * r45913;
        double r45915 = r45911 + r45914;
        return r45915;
}

double f(double x, double y) {
        double r45916 = 2.0;
        double r45917 = y;
        double r45918 = r45916 * r45917;
        double r45919 = x;
        double r45920 = 4.0;
        double r45921 = pow(r45919, r45920);
        double r45922 = 9.0;
        double r45923 = pow(r45917, r45920);
        double r45924 = -r45923;
        double r45925 = fma(r45921, r45922, r45924);
        double r45926 = 3.0;
        double r45927 = pow(r45925, r45926);
        double r45928 = cbrt(r45927);
        double r45929 = fma(r45918, r45917, r45928);
        return r45929;
}

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