Average Error: 62.0 → 52.0
Time: 2.3s
Precision: 64
\[x = 10864 \land y = 18817\]
\[9 \cdot {x}^{4} - \left(y \cdot y\right) \cdot \left(y \cdot y - 2\right)\]
\[\sqrt[3]{{\left(\mathsf{fma}\left({x}^{4}, 9, -{y}^{4}\right)\right)}^{3}} - \left(y \cdot y\right) \cdot \left(-2\right)\]
9 \cdot {x}^{4} - \left(y \cdot y\right) \cdot \left(y \cdot y - 2\right)
\sqrt[3]{{\left(\mathsf{fma}\left({x}^{4}, 9, -{y}^{4}\right)\right)}^{3}} - \left(y \cdot y\right) \cdot \left(-2\right)
double f(double x, double y) {
        double r64232 = 9.0;
        double r64233 = x;
        double r64234 = 4.0;
        double r64235 = pow(r64233, r64234);
        double r64236 = r64232 * r64235;
        double r64237 = y;
        double r64238 = r64237 * r64237;
        double r64239 = 2.0;
        double r64240 = r64238 - r64239;
        double r64241 = r64238 * r64240;
        double r64242 = r64236 - r64241;
        return r64242;
}

double f(double x, double y) {
        double r64243 = x;
        double r64244 = 4.0;
        double r64245 = pow(r64243, r64244);
        double r64246 = 9.0;
        double r64247 = y;
        double r64248 = 4.0;
        double r64249 = pow(r64247, r64248);
        double r64250 = -r64249;
        double r64251 = fma(r64245, r64246, r64250);
        double r64252 = 3.0;
        double r64253 = pow(r64251, r64252);
        double r64254 = cbrt(r64253);
        double r64255 = r64247 * r64247;
        double r64256 = 2.0;
        double r64257 = -r64256;
        double r64258 = r64255 * r64257;
        double r64259 = r64254 - r64258;
        return r64259;
}

Error

Derivation

  1. Initial program 62.0

    \[9 \cdot {x}^{4} - \left(y \cdot y\right) \cdot \left(y \cdot y - 2\right)\]
  2. Using strategy rm
  3. Applied sub-neg62.0

    \[\leadsto 9 \cdot {x}^{4} - \left(y \cdot y\right) \cdot \color{blue}{\left(y \cdot y + \left(-2\right)\right)}\]
  4. Applied distribute-lft-in62.0

    \[\leadsto 9 \cdot {x}^{4} - \color{blue}{\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right) + \left(y \cdot y\right) \cdot \left(-2\right)\right)}\]
  5. Applied associate--r+52.0

    \[\leadsto \color{blue}{\left(9 \cdot {x}^{4} - \left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) - \left(y \cdot y\right) \cdot \left(-2\right)}\]
  6. Simplified52.0

    \[\leadsto \color{blue}{\mathsf{fma}\left({x}^{4}, 9, -{y}^{4}\right)} - \left(y \cdot y\right) \cdot \left(-2\right)\]
  7. Using strategy rm
  8. Applied add-cbrt-cube52.0

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

    \[\leadsto \sqrt[3]{\color{blue}{{\left(\mathsf{fma}\left({x}^{4}, 9, -{y}^{4}\right)\right)}^{3}}} - \left(y \cdot y\right) \cdot \left(-2\right)\]
  10. Final simplification52.0

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

Reproduce

herbie shell --seed 2020065 +o rules:numerics
(FPCore (x y)
  :name "From Rump in a 1983 paper, rewritten"
  :precision binary64
  :pre (and (== x 10864) (== y 18817))
  (- (* 9 (pow x 4)) (* (* y y) (- (* y y) 2))))