Average Error: 62.0 → 0
Time: 4.2s
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 r4116313 = 9.0;
        double r4116314 = x;
        double r4116315 = 4.0;
        double r4116316 = pow(r4116314, r4116315);
        double r4116317 = r4116313 * r4116316;
        double r4116318 = y;
        double r4116319 = r4116318 * r4116318;
        double r4116320 = 2.0;
        double r4116321 = r4116319 - r4116320;
        double r4116322 = r4116319 * r4116321;
        double r4116323 = r4116317 - r4116322;
        return r4116323;
}

double f(double x, double y) {
        double r4116324 = y;
        double r4116325 = r4116324 * r4116324;
        double r4116326 = 2.0;
        double r4116327 = r4116326 - r4116325;
        double r4116328 = 9.0;
        double r4116329 = x;
        double r4116330 = 4.0;
        double r4116331 = pow(r4116329, r4116330);
        double r4116332 = r4116328 * r4116331;
        double r4116333 = fma(r4116325, r4116327, r4116332);
        return r4116333;
}

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