Average Error: 0.1 → 0.1
Time: 13.2s
Precision: 64
\[\left(x \cdot y\right) \cdot \left(1 - y\right)\]
\[\left(x \cdot y\right) \cdot \left(1 - y\right)\]
\left(x \cdot y\right) \cdot \left(1 - y\right)
\left(x \cdot y\right) \cdot \left(1 - y\right)
double f(double x, double y) {
        double r40521 = x;
        double r40522 = y;
        double r40523 = r40521 * r40522;
        double r40524 = 1.0;
        double r40525 = r40524 - r40522;
        double r40526 = r40523 * r40525;
        return r40526;
}

double f(double x, double y) {
        double r40527 = x;
        double r40528 = y;
        double r40529 = r40527 * r40528;
        double r40530 = 1.0;
        double r40531 = r40530 - r40528;
        double r40532 = r40529 * r40531;
        return r40532;
}

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

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

Reproduce

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