Average Error: 0.0 → 0.0
Time: 7.8s
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 r7716263 = x;
        double r7716264 = 1.0;
        double r7716265 = y;
        double r7716266 = r7716264 - r7716265;
        double r7716267 = r7716263 * r7716266;
        return r7716267;
}

double f(double x, double y) {
        double r7716268 = 1.0;
        double r7716269 = y;
        double r7716270 = r7716268 - r7716269;
        double r7716271 = x;
        double r7716272 = r7716270 * r7716271;
        return r7716272;
}

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