Average Error: 0.0 → 0.0
Time: 7.7s
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 r11463634 = x;
        double r11463635 = 1.0;
        double r11463636 = y;
        double r11463637 = r11463635 - r11463636;
        double r11463638 = r11463634 * r11463637;
        return r11463638;
}

double f(double x, double y) {
        double r11463639 = x;
        double r11463640 = y;
        double r11463641 = -r11463640;
        double r11463642 = r11463639 * r11463641;
        double r11463643 = 1.0;
        double r11463644 = r11463643 * r11463639;
        double r11463645 = r11463642 + r11463644;
        return r11463645;
}

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