Average Error: 0.1 → 0.1
Time: 7.6s
Precision: 64
\[\left(x \cdot y\right) \cdot \left(1.0 - y\right)\]
\[\left(1.0 - y\right) \cdot \left(x \cdot y\right)\]
\left(x \cdot y\right) \cdot \left(1.0 - y\right)
\left(1.0 - y\right) \cdot \left(x \cdot y\right)
double f(double x, double y) {
        double r837639 = x;
        double r837640 = y;
        double r837641 = r837639 * r837640;
        double r837642 = 1.0;
        double r837643 = r837642 - r837640;
        double r837644 = r837641 * r837643;
        return r837644;
}

double f(double x, double y) {
        double r837645 = 1.0;
        double r837646 = y;
        double r837647 = r837645 - r837646;
        double r837648 = x;
        double r837649 = r837648 * r837646;
        double r837650 = r837647 * r837649;
        return r837650;
}

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.0 - y\right)\]
  2. Final simplification0.1

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

Reproduce

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