Average Error: 0.1 → 0.1
Time: 16.3s
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 r1750125 = x;
        double r1750126 = y;
        double r1750127 = r1750125 * r1750126;
        double r1750128 = 1.0;
        double r1750129 = r1750128 - r1750126;
        double r1750130 = r1750127 * r1750129;
        return r1750130;
}

double f(double x, double y) {
        double r1750131 = y;
        double r1750132 = x;
        double r1750133 = r1750131 * r1750132;
        double r1750134 = -r1750131;
        double r1750135 = r1750133 * r1750134;
        double r1750136 = 1.0;
        double r1750137 = r1750133 * r1750136;
        double r1750138 = r1750135 + r1750137;
        return r1750138;
}

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)))