Average Error: 0.0 → 0.0
Time: 480.0ms
Precision: 64
\[\left(x \cdot y + x\right) + y\]
\[\left(x \cdot y + x\right) + y\]
\left(x \cdot y + x\right) + y
\left(x \cdot y + x\right) + y
double f(double x, double y) {
        double r102611 = x;
        double r102612 = y;
        double r102613 = r102611 * r102612;
        double r102614 = r102613 + r102611;
        double r102615 = r102614 + r102612;
        return r102615;
}

double f(double x, double y) {
        double r102616 = x;
        double r102617 = y;
        double r102618 = r102616 * r102617;
        double r102619 = r102618 + r102616;
        double r102620 = r102619 + r102617;
        return r102620;
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.0

    \[\left(x \cdot y + x\right) + y\]
  2. Final simplification0.0

    \[\leadsto \left(x \cdot y + x\right) + y\]

Reproduce

herbie shell --seed 2020024 +o rules:numerics
(FPCore (x y)
  :name "Numeric.Log:$cexpm1 from log-domain-0.10.2.1, B"
  :precision binary64
  (+ (+ (* x y) x) y))