Average Error: 0.1 → 0.1
Time: 17.3s
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 r23754 = x;
        double r23755 = y;
        double r23756 = r23754 * r23755;
        double r23757 = 1.0;
        double r23758 = r23757 - r23755;
        double r23759 = r23756 * r23758;
        return r23759;
}

double f(double x, double y) {
        double r23760 = x;
        double r23761 = 1.0;
        double r23762 = y;
        double r23763 = r23761 - r23762;
        double r23764 = r23760 * r23763;
        double r23765 = r23764 * r23762;
        return r23765;
}

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

    \[\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 2019326 +o rules:numerics
(FPCore (x y)
  :name "Statistics.Distribution.Binomial:$cvariance from math-functions-0.1.5.2"
  :precision binary64
  (* (* x y) (- 1 y)))