Average Error: 0.0 → 0.0
Time: 41.4s
Precision: 64
\[\left(x + y\right) - x \cdot y\]
\[\left(y - x \cdot y\right) + x\]
\left(x + y\right) - x \cdot y
\left(y - x \cdot y\right) + x
double f(double x, double y) {
        double r13384982 = x;
        double r13384983 = y;
        double r13384984 = r13384982 + r13384983;
        double r13384985 = r13384982 * r13384983;
        double r13384986 = r13384984 - r13384985;
        return r13384986;
}

double f(double x, double y) {
        double r13384987 = y;
        double r13384988 = x;
        double r13384989 = r13384988 * r13384987;
        double r13384990 = r13384987 - r13384989;
        double r13384991 = r13384990 + r13384988;
        return r13384991;
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.0

    \[\left(x + y\right) - x \cdot y\]
  2. Using strategy rm
  3. Applied associate--l+0.0

    \[\leadsto \color{blue}{x + \left(y - x \cdot y\right)}\]
  4. Final simplification0.0

    \[\leadsto \left(y - x \cdot y\right) + x\]

Reproduce

herbie shell --seed 2019165 
(FPCore (x y)
  :name "Data.Colour.RGBSpace.HSL:hsl from colour-2.3.3, A"
  (- (+ x y) (* x y)))