Average Error: 0.1 → 0.1
Time: 12.3s
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 r15813 = x;
        double r15814 = y;
        double r15815 = r15813 * r15814;
        double r15816 = 1.0;
        double r15817 = r15816 - r15814;
        double r15818 = r15815 * r15817;
        return r15818;
}

double f(double x, double y) {
        double r15819 = x;
        double r15820 = y;
        double r15821 = r15819 * r15820;
        double r15822 = 1.0;
        double r15823 = r15822 - r15820;
        double r15824 = r15821 * r15823;
        return r15824;
}

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 2019174 +o rules:numerics
(FPCore (x y)
  :name "Statistics.Distribution.Binomial:$cvariance from math-functions-0.1.5.2"
  (* (* x y) (- 1.0 y)))