Average Error: 62.0 → 0
Time: 3.8s
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 y, 2 - 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(y \cdot y, 2 - y \cdot y, 9 \cdot {x}^{4}\right)
double f(double x, double y) {
        double r31690 = 9.0;
        double r31691 = x;
        double r31692 = 4.0;
        double r31693 = pow(r31691, r31692);
        double r31694 = r31690 * r31693;
        double r31695 = y;
        double r31696 = r31695 * r31695;
        double r31697 = 2.0;
        double r31698 = r31696 - r31697;
        double r31699 = r31696 * r31698;
        double r31700 = r31694 - r31699;
        return r31700;
}

double f(double x, double y) {
        double r31701 = y;
        double r31702 = r31701 * r31701;
        double r31703 = 2.0;
        double r31704 = r31703 - r31702;
        double r31705 = 9.0;
        double r31706 = x;
        double r31707 = 4.0;
        double r31708 = pow(r31706, r31707);
        double r31709 = r31705 * r31708;
        double r31710 = fma(r31702, r31704, r31709);
        return r31710;
}

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

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

Reproduce

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