Average Error: 0.0 → 0.0
Time: 1.1s
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 r7640977 = x;
        double r7640978 = 1.0;
        double r7640979 = y;
        double r7640980 = r7640978 - r7640979;
        double r7640981 = r7640977 * r7640980;
        return r7640981;
}

double f(double x, double y) {
        double r7640982 = 1.0;
        double r7640983 = y;
        double r7640984 = r7640982 - r7640983;
        double r7640985 = x;
        double r7640986 = r7640984 * r7640985;
        return r7640986;
}

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