Average Error: 0.0 → 0.0
Time: 3.9s
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 r8663483 = x;
        double r8663484 = 1.0;
        double r8663485 = y;
        double r8663486 = r8663484 - r8663485;
        double r8663487 = r8663483 * r8663486;
        return r8663487;
}

double f(double x, double y) {
        double r8663488 = 1.0;
        double r8663489 = y;
        double r8663490 = r8663488 - r8663489;
        double r8663491 = x;
        double r8663492 = r8663490 * r8663491;
        return r8663492;
}

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 2019171 +o rules:numerics
(FPCore (x y)
  :name "Data.Colour.RGBSpace.HSV:hsv from colour-2.3.3, H"
  (* x (- 1.0 y)))