Average Error: 0.1 → 0.1
Time: 9.1s
Precision: 64
\[\left(x \cdot y\right) \cdot \left(1 - y\right)\]
\[\left(y \cdot x\right) \cdot \left(-y\right) + \left(y \cdot x\right) \cdot 1\]
\left(x \cdot y\right) \cdot \left(1 - y\right)
\left(y \cdot x\right) \cdot \left(-y\right) + \left(y \cdot x\right) \cdot 1
double f(double x, double y) {
        double r1816302 = x;
        double r1816303 = y;
        double r1816304 = r1816302 * r1816303;
        double r1816305 = 1.0;
        double r1816306 = r1816305 - r1816303;
        double r1816307 = r1816304 * r1816306;
        return r1816307;
}

double f(double x, double y) {
        double r1816308 = y;
        double r1816309 = x;
        double r1816310 = r1816308 * r1816309;
        double r1816311 = -r1816308;
        double r1816312 = r1816310 * r1816311;
        double r1816313 = 1.0;
        double r1816314 = r1816310 * r1816313;
        double r1816315 = r1816312 + r1816314;
        return r1816315;
}

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 sub-neg0.1

    \[\leadsto \left(x \cdot y\right) \cdot \color{blue}{\left(1 + \left(-y\right)\right)}\]
  4. Applied distribute-rgt-in0.1

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

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

Reproduce

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