Average Error: 0.0 → 0.0
Time: 10.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 r56335 = x;
        double r56336 = y;
        double r56337 = r56335 * r56336;
        double r56338 = r56337 + r56335;
        double r56339 = r56338 + r56336;
        return r56339;
}

double f(double x, double y) {
        double r56340 = x;
        double r56341 = y;
        double r56342 = r56340 * r56341;
        double r56343 = r56340 + r56341;
        double r56344 = r56342 + r56343;
        return r56344;
}

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 2019294 
(FPCore (x y)
  :name "Numeric.Log:$cexpm1 from log-domain-0.10.2.1, B"
  :precision binary64
  (+ (+ (* x y) x) y))