Average Error: 0.1 → 0.1
Time: 16.7s
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 r25873 = x;
        double r25874 = y;
        double r25875 = r25873 * r25874;
        double r25876 = 1.0;
        double r25877 = r25876 - r25874;
        double r25878 = r25875 * r25877;
        return r25878;
}

double f(double x, double y) {
        double r25879 = x;
        double r25880 = 1.0;
        double r25881 = y;
        double r25882 = r25880 - r25881;
        double r25883 = r25879 * r25882;
        double r25884 = r25883 * r25881;
        return r25884;
}

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.8

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