Average Error: 0.1 → 0.1
Time: 3.1s
Precision: 64
\[\left(x \cdot y\right) \cdot \left(1 - y\right)\]
\[\left(1 - y\right) \cdot \left(x \cdot y\right)\]
\left(x \cdot y\right) \cdot \left(1 - y\right)
\left(1 - y\right) \cdot \left(x \cdot y\right)
double f(double x, double y) {
        double r17676 = x;
        double r17677 = y;
        double r17678 = r17676 * r17677;
        double r17679 = 1.0;
        double r17680 = r17679 - r17677;
        double r17681 = r17678 * r17680;
        return r17681;
}

double f(double x, double y) {
        double r17682 = 1.0;
        double r17683 = y;
        double r17684 = r17682 - r17683;
        double r17685 = x;
        double r17686 = r17685 * r17683;
        double r17687 = r17684 * r17686;
        return r17687;
}

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.1

    \[\left(x \cdot y\right) \cdot \left(1 - y\right)\]
  2. Using strategy rm
  3. Applied *-commutative0.1

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

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

Reproduce

herbie shell --seed 2020036 +o rules:numerics
(FPCore (x y)
  :name "Statistics.Distribution.Binomial:$cvariance from math-functions-0.1.5.2"
  :precision binary64
  (* (* x y) (- 1 y)))