Average Error: 0.0 → 0.0
Time: 19.2s
Precision: 64
\[\left(x \cdot y + x\right) + y\]
\[x \cdot y + \left(x + y\right)\]
\left(x \cdot y + x\right) + y
x \cdot y + \left(x + y\right)
double f(double x, double y) {
        double r67688 = x;
        double r67689 = y;
        double r67690 = r67688 * r67689;
        double r67691 = r67690 + r67688;
        double r67692 = r67691 + r67689;
        return r67692;
}

double f(double x, double y) {
        double r67693 = x;
        double r67694 = y;
        double r67695 = r67693 * r67694;
        double r67696 = r67693 + r67694;
        double r67697 = r67695 + r67696;
        return r67697;
}

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. Using strategy rm
  3. Applied associate-+l+0.0

    \[\leadsto \color{blue}{x \cdot y + \left(x + y\right)}\]
  4. Final simplification0.0

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

Reproduce

herbie shell --seed 2019199 
(FPCore (x y)
  :name "Numeric.Log:$cexpm1 from log-domain-0.10.2.1, B"
  (+ (+ (* x y) x) y))