Average Error: 62.0 → 0
Time: 5.7s
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 r80793 = 9.0;
        double r80794 = x;
        double r80795 = 4.0;
        double r80796 = pow(r80794, r80795);
        double r80797 = r80793 * r80796;
        double r80798 = y;
        double r80799 = r80798 * r80798;
        double r80800 = 2.0;
        double r80801 = r80799 - r80800;
        double r80802 = r80799 * r80801;
        double r80803 = r80797 - r80802;
        return r80803;
}

double f(double x, double y) {
        double r80804 = y;
        double r80805 = -r80804;
        double r80806 = 2.0;
        double r80807 = fma(r80804, r80805, r80806);
        double r80808 = r80804 * r80807;
        double r80809 = 9.0;
        double r80810 = x;
        double r80811 = 4.0;
        double r80812 = pow(r80810, r80811);
        double r80813 = r80809 * r80812;
        double r80814 = fma(r80808, r80804, r80813);
        return r80814;
}

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