Average Error: 52.0 → 52.0
Time: 2.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(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 r95010 = 9.0;
        double r95011 = x;
        double r95012 = 4.0;
        double r95013 = pow(r95011, r95012);
        double r95014 = r95010 * r95013;
        double r95015 = y;
        double r95016 = pow(r95015, r95012);
        double r95017 = r95014 - r95016;
        double r95018 = 2.0;
        double r95019 = r95015 * r95015;
        double r95020 = r95018 * r95019;
        double r95021 = r95017 + r95020;
        return r95021;
}

double f(double x, double y) {
        double r95022 = 2.0;
        double r95023 = y;
        double r95024 = r95022 * r95023;
        double r95025 = 9.0;
        double r95026 = x;
        double r95027 = 4.0;
        double r95028 = pow(r95026, r95027);
        double r95029 = r95025 * r95028;
        double r95030 = pow(r95023, r95027);
        double r95031 = r95029 - r95030;
        double r95032 = 3.0;
        double r95033 = pow(r95031, r95032);
        double r95034 = cbrt(r95033);
        double r95035 = fma(r95024, r95023, r95034);
        return r95035;
}

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