Average Error: 52.0 → 52.0
Time: 2.6s
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(9 \cdot {x}^{4} - {y}^{4}\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(9 \cdot {x}^{4} - {y}^{4}\right)}^{3}}\right)
double f(double x, double y) {
        double r64002 = 9.0;
        double r64003 = x;
        double r64004 = 4.0;
        double r64005 = pow(r64003, r64004);
        double r64006 = r64002 * r64005;
        double r64007 = y;
        double r64008 = pow(r64007, r64004);
        double r64009 = r64006 - r64008;
        double r64010 = 2.0;
        double r64011 = r64007 * r64007;
        double r64012 = r64010 * r64011;
        double r64013 = r64009 + r64012;
        return r64013;
}

double f(double x, double y) {
        double r64014 = 2.0;
        double r64015 = y;
        double r64016 = r64014 * r64015;
        double r64017 = 9.0;
        double r64018 = x;
        double r64019 = 4.0;
        double r64020 = pow(r64018, r64019);
        double r64021 = r64017 * r64020;
        double r64022 = pow(r64015, r64019);
        double r64023 = r64021 - r64022;
        double r64024 = 3.0;
        double r64025 = pow(r64023, r64024);
        double r64026 = cbrt(r64025);
        double r64027 = fma(r64016, r64015, r64026);
        return r64027;
}

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(9 \cdot {x}^{4} - {y}^{4}\right)}^{3}}}\right)\]
  6. Final simplification52.0

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

Reproduce

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