Average Error: 0.0 → 0.0
Time: 6.0s
Precision: 64
\[\left(x + y\right) - x \cdot y\]
\[\left(x + y\right) - y \cdot x\]
\left(x + y\right) - x \cdot y
\left(x + y\right) - y \cdot x
double f(double x, double y) {
        double r412931 = x;
        double r412932 = y;
        double r412933 = r412931 + r412932;
        double r412934 = r412931 * r412932;
        double r412935 = r412933 - r412934;
        return r412935;
}

double f(double x, double y) {
        double r412936 = x;
        double r412937 = y;
        double r412938 = r412936 + r412937;
        double r412939 = r412937 * r412936;
        double r412940 = r412938 - r412939;
        return r412940;
}

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\right) - x \cdot y}\]
  3. Final simplification0.0

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

Reproduce

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