Average Error: 0.0 → 0.0
Time: 641.0ms
Precision: 64
\[\left(x + y\right) - x \cdot y\]
\[x + \left(y - x \cdot y\right)\]
\left(x + y\right) - x \cdot y
x + \left(y - x \cdot y\right)
double f(double x, double y) {
        double r259128 = x;
        double r259129 = y;
        double r259130 = r259128 + r259129;
        double r259131 = r259128 * r259129;
        double r259132 = r259130 - r259131;
        return r259132;
}

double f(double x, double y) {
        double r259133 = x;
        double r259134 = y;
        double r259135 = r259133 * r259134;
        double r259136 = r259134 - r259135;
        double r259137 = r259133 + r259136;
        return r259137;
}

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 x + \left(y - x \cdot y\right)\]

Reproduce

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