Average Error: 52.0 → 52.0
Time: 7.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(\mathsf{fma}\left(9, {x}^{4}, -{y}^{4}\right)\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(\mathsf{fma}\left(9, {x}^{4}, -{y}^{4}\right)\right)}^{3}}\right)
double f(double x, double y) {
        double r117122 = 9.0;
        double r117123 = x;
        double r117124 = 4.0;
        double r117125 = pow(r117123, r117124);
        double r117126 = r117122 * r117125;
        double r117127 = y;
        double r117128 = pow(r117127, r117124);
        double r117129 = r117126 - r117128;
        double r117130 = 2.0;
        double r117131 = r117127 * r117127;
        double r117132 = r117130 * r117131;
        double r117133 = r117129 + r117132;
        return r117133;
}

double f(double x, double y) {
        double r117134 = 2.0;
        double r117135 = y;
        double r117136 = r117134 * r117135;
        double r117137 = 9.0;
        double r117138 = x;
        double r117139 = 4.0;
        double r117140 = pow(r117138, r117139);
        double r117141 = pow(r117135, r117139);
        double r117142 = -r117141;
        double r117143 = fma(r117137, r117140, r117142);
        double r117144 = 3.0;
        double r117145 = pow(r117143, r117144);
        double r117146 = cbrt(r117145);
        double r117147 = fma(r117136, r117135, r117146);
        return r117147;
}

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

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

Reproduce

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