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 r64924 = 9.0;
        double r64925 = x;
        double r64926 = 4.0;
        double r64927 = pow(r64925, r64926);
        double r64928 = r64924 * r64927;
        double r64929 = y;
        double r64930 = r64929 * r64929;
        double r64931 = 2.0;
        double r64932 = r64930 - r64931;
        double r64933 = r64930 * r64932;
        double r64934 = r64928 - r64933;
        return r64934;
}

double f(double x, double y) {
        double r64935 = x;
        double r64936 = 4.0;
        double r64937 = pow(r64935, r64936);
        double r64938 = 9.0;
        double r64939 = y;
        double r64940 = 4.0;
        double r64941 = pow(r64939, r64940);
        double r64942 = -r64941;
        double r64943 = fma(r64937, r64938, r64942);
        double r64944 = 3.0;
        double r64945 = pow(r64943, r64944);
        double r64946 = cbrt(r64945);
        double r64947 = r64939 * r64939;
        double r64948 = 2.0;
        double r64949 = -r64948;
        double r64950 = r64947 * r64949;
        double r64951 = r64946 - r64950;
        return r64951;
}

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