Average Error: 0.0 → 0.0
Time: 985.0ms
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 r693616 = x;
        double r693617 = y;
        double r693618 = 1.0;
        double r693619 = r693617 + r693618;
        double r693620 = r693616 * r693619;
        return r693620;
}

double f(double x, double y) {
        double r693621 = 1.0;
        double r693622 = y;
        double r693623 = r693621 + r693622;
        double r693624 = x;
        double r693625 = r693623 * r693624;
        return r693625;
}

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

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

  (* x (+ y 1.0)))