Average Error: 0.0 → 0.0
Time: 20.3s
Precision: 64
\[x \cdot \left(1.0 - y\right)\]
\[x \cdot \left(-y\right) + 1.0 \cdot x\]
x \cdot \left(1.0 - y\right)
x \cdot \left(-y\right) + 1.0 \cdot x
double f(double x, double y) {
        double r12283693 = x;
        double r12283694 = 1.0;
        double r12283695 = y;
        double r12283696 = r12283694 - r12283695;
        double r12283697 = r12283693 * r12283696;
        return r12283697;
}

double f(double x, double y) {
        double r12283698 = x;
        double r12283699 = y;
        double r12283700 = -r12283699;
        double r12283701 = r12283698 * r12283700;
        double r12283702 = 1.0;
        double r12283703 = r12283702 * r12283698;
        double r12283704 = r12283701 + r12283703;
        return r12283704;
}

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

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

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

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

Reproduce

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