Average Error: 0.1 → 0.1
Time: 11.1s
Precision: 64
\[\left(x \cdot y\right) \cdot \left(1 - y\right)\]
\[y \cdot \left(\left(1 - y\right) \cdot x\right)\]
\left(x \cdot y\right) \cdot \left(1 - y\right)
y \cdot \left(\left(1 - y\right) \cdot x\right)
double f(double x, double y) {
        double r24485 = x;
        double r24486 = y;
        double r24487 = r24485 * r24486;
        double r24488 = 1.0;
        double r24489 = r24488 - r24486;
        double r24490 = r24487 * r24489;
        return r24490;
}

double f(double x, double y) {
        double r24491 = y;
        double r24492 = 1.0;
        double r24493 = r24492 - r24491;
        double r24494 = x;
        double r24495 = r24493 * r24494;
        double r24496 = r24491 * r24495;
        return r24496;
}

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

    \[\leadsto \color{blue}{\left(1 - y\right) \cdot \left(x \cdot y\right)}\]
  3. Using strategy rm
  4. Applied associate-*r*0.1

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

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

Reproduce

herbie shell --seed 2019196 
(FPCore (x y)
  :name "Statistics.Distribution.Binomial:$cvariance from math-functions-0.1.5.2"
  (* (* x y) (- 1.0 y)))