Average Error: 0.0 → 0.0
Time: 2.7s
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 r665784 = x;
        double r665785 = y;
        double r665786 = 1.0;
        double r665787 = r665785 + r665786;
        double r665788 = r665784 * r665787;
        return r665788;
}

double f(double x, double y) {
        double r665789 = 1.0;
        double r665790 = y;
        double r665791 = r665789 + r665790;
        double r665792 = x;
        double r665793 = r665791 * r665792;
        return r665793;
}

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 2019174 
(FPCore (x y)
  :name "Data.Colour.RGBSpace.HSL:hsl from colour-2.3.3, B"

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

  (* x (+ y 1.0)))