Average Error: 52.0 → 52.0
Time: 12.3s
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({x}^{4} \cdot 9 - {y}^{4}\right) \cdot \left(\left({x}^{4} \cdot 9 - {y}^{4}\right) \cdot \left({x}^{4} \cdot 9 - {y}^{4}\right)\right)}\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({x}^{4} \cdot 9 - {y}^{4}\right) \cdot \left(\left({x}^{4} \cdot 9 - {y}^{4}\right) \cdot \left({x}^{4} \cdot 9 - {y}^{4}\right)\right)}\right)
double f(double x, double y) {
        double r2303247 = 9.0;
        double r2303248 = x;
        double r2303249 = 4.0;
        double r2303250 = pow(r2303248, r2303249);
        double r2303251 = r2303247 * r2303250;
        double r2303252 = y;
        double r2303253 = pow(r2303252, r2303249);
        double r2303254 = r2303251 - r2303253;
        double r2303255 = 2.0;
        double r2303256 = r2303252 * r2303252;
        double r2303257 = r2303255 * r2303256;
        double r2303258 = r2303254 + r2303257;
        return r2303258;
}

double f(double x, double y) {
        double r2303259 = 2.0;
        double r2303260 = y;
        double r2303261 = r2303259 * r2303260;
        double r2303262 = x;
        double r2303263 = 4.0;
        double r2303264 = pow(r2303262, r2303263);
        double r2303265 = 9.0;
        double r2303266 = r2303264 * r2303265;
        double r2303267 = pow(r2303260, r2303263);
        double r2303268 = r2303266 - r2303267;
        double r2303269 = r2303268 * r2303268;
        double r2303270 = r2303268 * r2303269;
        double r2303271 = cbrt(r2303270);
        double r2303272 = fma(r2303261, r2303260, r2303271);
        return r2303272;
}

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

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

Reproduce

herbie shell --seed 2019174 +o rules:numerics
(FPCore (x y)
  :name "From Rump in a 1983 paper"
  :pre (and (== x 10864.0) (== y 18817.0))
  (+ (- (* 9.0 (pow x 4.0)) (pow y 4.0)) (* 2.0 (* y y))))