Average Error: 0.0 → 0.0
Time: 30.0s
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 r231651 = x;
        double r231652 = y;
        double r231653 = r231651 + r231652;
        double r231654 = r231651 * r231652;
        double r231655 = r231653 - r231654;
        return r231655;
}

double f(double x, double y) {
        double r231656 = y;
        double r231657 = x;
        double r231658 = r231657 * r231656;
        double r231659 = r231656 - r231658;
        double r231660 = r231659 + r231657;
        return r231660;
}

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. Simplified0.0

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

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

Reproduce

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