Average Error: 0.0 → 0.0
Time: 5.2s
Precision: 64
\[x \cdot \left(1 - y\right)\]
\[1 \cdot x + x \cdot \left(-y\right)\]
x \cdot \left(1 - y\right)
1 \cdot x + x \cdot \left(-y\right)
double f(double x, double y) {
        double r145744 = x;
        double r145745 = 1.0;
        double r145746 = y;
        double r145747 = r145745 - r145746;
        double r145748 = r145744 * r145747;
        return r145748;
}

double f(double x, double y) {
        double r145749 = 1.0;
        double r145750 = x;
        double r145751 = r145749 * r145750;
        double r145752 = y;
        double r145753 = -r145752;
        double r145754 = r145750 * r145753;
        double r145755 = r145751 + r145754;
        return r145755;
}

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. Simplified0.0

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

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

Reproduce

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