Average Error: 0.0 → 0.0
Time: 35.3s
Precision: 64
\[\left(x \cdot y + x\right) + y\]
\[\left(y + x\right) + x \cdot y\]
\left(x \cdot y + x\right) + y
\left(y + x\right) + x \cdot y
double f(double x, double y) {
        double r4921675 = x;
        double r4921676 = y;
        double r4921677 = r4921675 * r4921676;
        double r4921678 = r4921677 + r4921675;
        double r4921679 = r4921678 + r4921676;
        return r4921679;
}

double f(double x, double y) {
        double r4921680 = y;
        double r4921681 = x;
        double r4921682 = r4921680 + r4921681;
        double r4921683 = r4921681 * r4921680;
        double r4921684 = r4921682 + r4921683;
        return r4921684;
}

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 \left(y + x\right) + x \cdot y\]

Reproduce

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