Average Error: 0.0 → 0.0
Time: 12.9s
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 r13098857 = x;
        double r13098858 = y;
        double r13098859 = r13098857 + r13098858;
        double r13098860 = r13098857 * r13098858;
        double r13098861 = r13098859 - r13098860;
        return r13098861;
}

double f(double x, double y) {
        double r13098862 = y;
        double r13098863 = x;
        double r13098864 = r13098863 * r13098862;
        double r13098865 = r13098862 - r13098864;
        double r13098866 = r13098865 + r13098863;
        return r13098866;
}

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)))