Average Error: 0.0 → 0.0
Time: 5.5s
Precision: 64
\[x \cdot \left(y + 1.0\right)\]
\[y \cdot x + 1.0 \cdot x\]
x \cdot \left(y + 1.0\right)
y \cdot x + 1.0 \cdot x
double f(double x, double y) {
        double r40483979 = x;
        double r40483980 = y;
        double r40483981 = 1.0;
        double r40483982 = r40483980 + r40483981;
        double r40483983 = r40483979 * r40483982;
        return r40483983;
}

double f(double x, double y) {
        double r40483984 = y;
        double r40483985 = x;
        double r40483986 = r40483984 * r40483985;
        double r40483987 = 1.0;
        double r40483988 = r40483987 * r40483985;
        double r40483989 = r40483986 + r40483988;
        return r40483989;
}

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.0\right)\]
  2. Using strategy rm
  3. Applied distribute-rgt-in0.0

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

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

Reproduce

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

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

  (* x (+ y 1.0)))