Average Error: 0.0 → 0.0
Time: 1.1s
Precision: 64
\[x \cdot \left(1.0 - y\right)\]
\[\left(1.0 - y\right) \cdot x\]
x \cdot \left(1.0 - y\right)
\left(1.0 - y\right) \cdot x
double f(double x, double y) {
        double r4556459 = x;
        double r4556460 = 1.0;
        double r4556461 = y;
        double r4556462 = r4556460 - r4556461;
        double r4556463 = r4556459 * r4556462;
        return r4556463;
}

double f(double x, double y) {
        double r4556464 = 1.0;
        double r4556465 = y;
        double r4556466 = r4556464 - r4556465;
        double r4556467 = x;
        double r4556468 = r4556466 * r4556467;
        return r4556468;
}

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.0 - y\right)\]
  2. Final simplification0.0

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

Reproduce

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