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(-2\right) \cdot \left(y \cdot y\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(-2\right) \cdot \left(y \cdot y\right)
double f(double x, double y) {
        double r64409 = 9.0;
        double r64410 = x;
        double r64411 = 4.0;
        double r64412 = pow(r64410, r64411);
        double r64413 = r64409 * r64412;
        double r64414 = y;
        double r64415 = r64414 * r64414;
        double r64416 = 2.0;
        double r64417 = r64415 - r64416;
        double r64418 = r64415 * r64417;
        double r64419 = r64413 - r64418;
        return r64419;
}

double f(double x, double y) {
        double r64420 = x;
        double r64421 = 4.0;
        double r64422 = pow(r64420, r64421);
        double r64423 = 9.0;
        double r64424 = y;
        double r64425 = 4.0;
        double r64426 = pow(r64424, r64425);
        double r64427 = -r64426;
        double r64428 = fma(r64422, r64423, r64427);
        double r64429 = 3.0;
        double r64430 = pow(r64428, r64429);
        double r64431 = cbrt(r64430);
        double r64432 = 2.0;
        double r64433 = -r64432;
        double r64434 = r64424 * r64424;
        double r64435 = r64433 * r64434;
        double r64436 = r64431 - r64435;
        return r64436;
}

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-rgt-in62.0

    \[\leadsto 9 \cdot {x}^{4} - \color{blue}{\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right) + \left(-2\right) \cdot \left(y \cdot y\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(-2\right) \cdot \left(y \cdot y\right)}\]
  6. Simplified52.0

    \[\leadsto \color{blue}{\mathsf{fma}\left({x}^{4}, 9, -{y}^{4}\right)} - \left(-2\right) \cdot \left(y \cdot y\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(-2\right) \cdot \left(y \cdot y\right)\]
  9. Simplified52.0

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

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

Reproduce

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