Average Error: 0.0 → 0.0
Time: 10.8s
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 r5524004 = x;
        double r5524005 = y;
        double r5524006 = r5524004 * r5524005;
        double r5524007 = r5524006 + r5524004;
        double r5524008 = r5524007 + r5524005;
        return r5524008;
}

double f(double x, double y) {
        double r5524009 = y;
        double r5524010 = x;
        double r5524011 = r5524009 + r5524010;
        double r5524012 = r5524010 * r5524009;
        double r5524013 = r5524011 + r5524012;
        return r5524013;
}

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