Average Error: 0.0 → 0.0
Time: 8.9s
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 r12262260 = x;
        double r12262261 = 1.0;
        double r12262262 = y;
        double r12262263 = r12262261 - r12262262;
        double r12262264 = r12262260 * r12262263;
        return r12262264;
}

double f(double x, double y) {
        double r12262265 = 1.0;
        double r12262266 = y;
        double r12262267 = r12262265 - r12262266;
        double r12262268 = x;
        double r12262269 = r12262267 * r12262268;
        return r12262269;
}

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