Average Error: 0.0 → 0.0
Time: 935.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 r9973521 = x;
        double r9973522 = 1.0;
        double r9973523 = y;
        double r9973524 = r9973522 - r9973523;
        double r9973525 = r9973521 * r9973524;
        return r9973525;
}

double f(double x, double y) {
        double r9973526 = 1.0;
        double r9973527 = y;
        double r9973528 = r9973526 - r9973527;
        double r9973529 = x;
        double r9973530 = r9973528 * r9973529;
        return r9973530;
}

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