Average Error: 0.1 → 0.1
Time: 8.9s
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 r17021 = x;
        double r17022 = y;
        double r17023 = r17021 * r17022;
        double r17024 = 1.0;
        double r17025 = r17024 - r17022;
        double r17026 = r17023 * r17025;
        return r17026;
}

double f(double x, double y) {
        double r17027 = 1.0;
        double r17028 = y;
        double r17029 = r17027 - r17028;
        double r17030 = x;
        double r17031 = r17030 * r17028;
        double r17032 = r17029 * r17031;
        return r17032;
}

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