Average Error: 0.0 → 0.0
Time: 5.8s
Precision: 64
\[x \cdot \left(1 - y\right)\]
\[x \cdot \left(-y\right) + 1 \cdot x\]
x \cdot \left(1 - y\right)
x \cdot \left(-y\right) + 1 \cdot x
double f(double x, double y) {
        double r10921068 = x;
        double r10921069 = 1.0;
        double r10921070 = y;
        double r10921071 = r10921069 - r10921070;
        double r10921072 = r10921068 * r10921071;
        return r10921072;
}

double f(double x, double y) {
        double r10921073 = x;
        double r10921074 = y;
        double r10921075 = -r10921074;
        double r10921076 = r10921073 * r10921075;
        double r10921077 = 1.0;
        double r10921078 = r10921077 * r10921073;
        double r10921079 = r10921076 + r10921078;
        return r10921079;
}

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. Using strategy rm
  3. Applied sub-neg0.0

    \[\leadsto x \cdot \color{blue}{\left(1 + \left(-y\right)\right)}\]
  4. Applied distribute-rgt-in0.0

    \[\leadsto \color{blue}{1 \cdot x + \left(-y\right) \cdot x}\]
  5. Final simplification0.0

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

Reproduce

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