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 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 r33630 = 9.0;
        double r33631 = x;
        double r33632 = 4.0;
        double r33633 = pow(r33631, r33632);
        double r33634 = r33630 * r33633;
        double r33635 = y;
        double r33636 = r33635 * r33635;
        double r33637 = 2.0;
        double r33638 = r33636 - r33637;
        double r33639 = r33636 * r33638;
        double r33640 = r33634 - r33639;
        return r33640;
}

double f(double x, double y) {
        double r33641 = y;
        double r33642 = r33641 * r33641;
        double r33643 = 2.0;
        double r33644 = r33643 - r33642;
        double r33645 = 9.0;
        double r33646 = x;
        double r33647 = 4.0;
        double r33648 = pow(r33646, r33647);
        double r33649 = r33645 * r33648;
        double r33650 = fma(r33642, r33644, r33649);
        return r33650;
}

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

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

Reproduce

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