Average Error: 0.1 → 0.1
Time: 9.6s
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 r34254 = x;
        double r34255 = y;
        double r34256 = r34254 * r34255;
        double r34257 = 1.0;
        double r34258 = r34257 - r34255;
        double r34259 = r34256 * r34258;
        return r34259;
}

double f(double x, double y) {
        double r34260 = x;
        double r34261 = 1.0;
        double r34262 = y;
        double r34263 = r34261 - r34262;
        double r34264 = r34260 * r34263;
        double r34265 = r34264 * r34262;
        return r34265;
}

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