Average Error: 0.0 → 0.0
Time: 5.4s
Precision: 64
\[x \cdot \left(y + 1\right)\]
\[\left(1 + y\right) \cdot x\]
x \cdot \left(y + 1\right)
\left(1 + y\right) \cdot x
double f(double x, double y) {
        double r560615 = x;
        double r560616 = y;
        double r560617 = 1.0;
        double r560618 = r560616 + r560617;
        double r560619 = r560615 * r560618;
        return r560619;
}

double f(double x, double y) {
        double r560620 = 1.0;
        double r560621 = y;
        double r560622 = r560620 + r560621;
        double r560623 = x;
        double r560624 = r560622 * r560623;
        return r560624;
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original0.0
Target0.0
Herbie0.0
\[x + x \cdot y\]

Derivation

  1. Initial program 0.0

    \[x \cdot \left(y + 1\right)\]
  2. Simplified0.0

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

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

Reproduce

herbie shell --seed 2019195 
(FPCore (x y)
  :name "Data.Colour.RGBSpace.HSL:hsl from colour-2.3.3, B"

  :herbie-target
  (+ x (* x y))

  (* x (+ y 1.0)))