Average Error: 62.0 → 0
Time: 3.5s
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 r95854 = 9.0;
        double r95855 = x;
        double r95856 = 4.0;
        double r95857 = pow(r95855, r95856);
        double r95858 = r95854 * r95857;
        double r95859 = y;
        double r95860 = r95859 * r95859;
        double r95861 = 2.0;
        double r95862 = r95860 - r95861;
        double r95863 = r95860 * r95862;
        double r95864 = r95858 - r95863;
        return r95864;
}

double f(double x, double y) {
        double r95865 = y;
        double r95866 = -r95865;
        double r95867 = 2.0;
        double r95868 = fma(r95865, r95866, r95867);
        double r95869 = r95865 * r95868;
        double r95870 = 9.0;
        double r95871 = x;
        double r95872 = 4.0;
        double r95873 = pow(r95871, r95872);
        double r95874 = r95870 * r95873;
        double r95875 = fma(r95869, r95865, r95874);
        return r95875;
}

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