Average Error: 0.1 → 0.1
Time: 16.0s
Precision: 64
\[\left(x \cdot y\right) \cdot \left(1.0 - y\right)\]
\[\left(y \cdot x\right) \cdot \left(-y\right) + \left(y \cdot x\right) \cdot 1.0\]
\left(x \cdot y\right) \cdot \left(1.0 - y\right)
\left(y \cdot x\right) \cdot \left(-y\right) + \left(y \cdot x\right) \cdot 1.0
double f(double x, double y) {
        double r1750128 = x;
        double r1750129 = y;
        double r1750130 = r1750128 * r1750129;
        double r1750131 = 1.0;
        double r1750132 = r1750131 - r1750129;
        double r1750133 = r1750130 * r1750132;
        return r1750133;
}

double f(double x, double y) {
        double r1750134 = y;
        double r1750135 = x;
        double r1750136 = r1750134 * r1750135;
        double r1750137 = -r1750134;
        double r1750138 = r1750136 * r1750137;
        double r1750139 = 1.0;
        double r1750140 = r1750136 * r1750139;
        double r1750141 = r1750138 + r1750140;
        return r1750141;
}

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.0 - y\right)\]
  2. Using strategy rm
  3. Applied sub-neg0.1

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

    \[\leadsto \color{blue}{1.0 \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.0\]

Reproduce

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