Average Error: 0.0 → 0.0
Time: 3.5s
Precision: 64
\[x \cdot \left(y + 1\right)\]
\[y \cdot x + 1 \cdot x\]
x \cdot \left(y + 1\right)
y \cdot x + 1 \cdot x
double f(double x, double y) {
        double r35279829 = x;
        double r35279830 = y;
        double r35279831 = 1.0;
        double r35279832 = r35279830 + r35279831;
        double r35279833 = r35279829 * r35279832;
        return r35279833;
}

double f(double x, double y) {
        double r35279834 = y;
        double r35279835 = x;
        double r35279836 = r35279834 * r35279835;
        double r35279837 = 1.0;
        double r35279838 = r35279837 * r35279835;
        double r35279839 = r35279836 + r35279838;
        return r35279839;
}

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. Using strategy rm
  3. Applied distribute-rgt-in0.0

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

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

Reproduce

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

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

  (* x (+ y 1.0)))