Average Error: 62.0 → 0
Time: 6.2s
Precision: 64
\[x = 10864 \land y = 18817\]
\[9 \cdot {x}^{4} - \left(y \cdot y\right) \cdot \left(y \cdot y - 2\right)\]
\[\mathsf{fma}\left(y \cdot \mathsf{fma}\left(y, -y, 2\right), y, 9 \cdot {x}^{4}\right)\]
9 \cdot {x}^{4} - \left(y \cdot y\right) \cdot \left(y \cdot y - 2\right)
\mathsf{fma}\left(y \cdot \mathsf{fma}\left(y, -y, 2\right), y, 9 \cdot {x}^{4}\right)
double f(double x, double y) {
        double r32122 = 9.0;
        double r32123 = x;
        double r32124 = 4.0;
        double r32125 = pow(r32123, r32124);
        double r32126 = r32122 * r32125;
        double r32127 = y;
        double r32128 = r32127 * r32127;
        double r32129 = 2.0;
        double r32130 = r32128 - r32129;
        double r32131 = r32128 * r32130;
        double r32132 = r32126 - r32131;
        return r32132;
}

double f(double x, double y) {
        double r32133 = y;
        double r32134 = -r32133;
        double r32135 = 2.0;
        double r32136 = fma(r32133, r32134, r32135);
        double r32137 = r32133 * r32136;
        double r32138 = 9.0;
        double r32139 = x;
        double r32140 = 4.0;
        double r32141 = pow(r32139, r32140);
        double r32142 = r32138 * r32141;
        double r32143 = fma(r32137, r32133, r32142);
        return r32143;
}

Error

Derivation

  1. Initial program 62.0

    \[9 \cdot {x}^{4} - \left(y \cdot y\right) \cdot \left(y \cdot y - 2\right)\]
  2. Simplified0

    \[\leadsto \color{blue}{\mathsf{fma}\left(y \cdot \mathsf{fma}\left(y, -y, 2\right), y, 9 \cdot {x}^{4}\right)}\]
  3. Final simplification0

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

Reproduce

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