Average Error: 0.0 → 0.0
Time: 2.7s
Precision: 64
\[x \cdot \left(y + 1\right)\]
\[1 \cdot x + y \cdot x\]
x \cdot \left(y + 1\right)
1 \cdot x + y \cdot x
double f(double x, double y) {
        double r39221215 = x;
        double r39221216 = y;
        double r39221217 = 1.0;
        double r39221218 = r39221216 + r39221217;
        double r39221219 = r39221215 * r39221218;
        return r39221219;
}

double f(double x, double y) {
        double r39221220 = 1.0;
        double r39221221 = x;
        double r39221222 = r39221220 * r39221221;
        double r39221223 = y;
        double r39221224 = r39221223 * r39221221;
        double r39221225 = r39221222 + r39221224;
        return r39221225;
}

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. Taylor expanded around 0 0.0

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

    \[\leadsto 1 \cdot x + y \cdot x\]

Reproduce

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

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

  (* x (+ y 1.0)))