Average Error: 0.1 → 0.1
Time: 9.8s
Precision: 64
\[\left(x \cdot y\right) \cdot \left(1 - y\right)\]
\[\left(x \cdot \left(1 - y\right)\right) \cdot y\]
\left(x \cdot y\right) \cdot \left(1 - y\right)
\left(x \cdot \left(1 - y\right)\right) \cdot y
double f(double x, double y) {
        double r25167 = x;
        double r25168 = y;
        double r25169 = r25167 * r25168;
        double r25170 = 1.0;
        double r25171 = r25170 - r25168;
        double r25172 = r25169 * r25171;
        return r25172;
}

double f(double x, double y) {
        double r25173 = x;
        double r25174 = 1.0;
        double r25175 = y;
        double r25176 = r25174 - r25175;
        double r25177 = r25173 * r25176;
        double r25178 = r25177 * r25175;
        return r25178;
}

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. Taylor expanded around 0 5.3

    \[\leadsto \color{blue}{1 \cdot \left(x \cdot y\right) - x \cdot {y}^{2}}\]
  3. Simplified0.1

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

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

Reproduce

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