Average Error: 0.0 → 0.0
Time: 855.0ms
Precision: 64
\[x \cdot \left(1 - y\right)\]
\[\left(1 - y\right) \cdot x\]
x \cdot \left(1 - y\right)
\left(1 - y\right) \cdot x
double f(double x, double y) {
        double r8859300 = x;
        double r8859301 = 1.0;
        double r8859302 = y;
        double r8859303 = r8859301 - r8859302;
        double r8859304 = r8859300 * r8859303;
        return r8859304;
}

double f(double x, double y) {
        double r8859305 = 1.0;
        double r8859306 = y;
        double r8859307 = r8859305 - r8859306;
        double r8859308 = x;
        double r8859309 = r8859307 * r8859308;
        return r8859309;
}

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

    \[x \cdot \left(1 - y\right)\]
  2. Final simplification0.0

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

Reproduce

herbie shell --seed 2019172 +o rules:numerics
(FPCore (x y)
  :name "Data.Colour.RGBSpace.HSV:hsv from colour-2.3.3, H"
  (* x (- 1.0 y)))