Average Error: 62.0 → 0
Time: 4.6s
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(2 - y \cdot y, y \cdot 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(2 - y \cdot y, y \cdot y, 9 \cdot {x}^{4}\right)
double f(double x, double y) {
        double r1798819 = 9.0;
        double r1798820 = x;
        double r1798821 = 4.0;
        double r1798822 = pow(r1798820, r1798821);
        double r1798823 = r1798819 * r1798822;
        double r1798824 = y;
        double r1798825 = r1798824 * r1798824;
        double r1798826 = 2.0;
        double r1798827 = r1798825 - r1798826;
        double r1798828 = r1798825 * r1798827;
        double r1798829 = r1798823 - r1798828;
        return r1798829;
}

double f(double x, double y) {
        double r1798830 = 2.0;
        double r1798831 = y;
        double r1798832 = r1798831 * r1798831;
        double r1798833 = r1798830 - r1798832;
        double r1798834 = 9.0;
        double r1798835 = x;
        double r1798836 = 4.0;
        double r1798837 = pow(r1798835, r1798836);
        double r1798838 = r1798834 * r1798837;
        double r1798839 = fma(r1798833, r1798832, r1798838);
        return r1798839;
}

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(2 - y \cdot y, y \cdot y, {x}^{4} \cdot 9\right)}\]
  3. Final simplification0

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

Reproduce

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