Average Error: 0.1 → 0.1
Time: 10.2s
Precision: 64
\[\left(x \cdot y\right) \cdot \left(1 - y\right)\]
\[\left(1 - y\right) \cdot \left(x \cdot y\right)\]
\left(x \cdot y\right) \cdot \left(1 - y\right)
\left(1 - y\right) \cdot \left(x \cdot y\right)
double f(double x, double y) {
        double r30309 = x;
        double r30310 = y;
        double r30311 = r30309 * r30310;
        double r30312 = 1.0;
        double r30313 = r30312 - r30310;
        double r30314 = r30311 * r30313;
        return r30314;
}

double f(double x, double y) {
        double r30315 = 1.0;
        double r30316 = y;
        double r30317 = r30315 - r30316;
        double r30318 = x;
        double r30319 = r30318 * r30316;
        double r30320 = r30317 * r30319;
        return r30320;
}

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. Using strategy rm
  3. Applied *-commutative0.1

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

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

Reproduce

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