Average Error: 0.1 → 0.1
Time: 41.7s
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 r1820318 = x;
        double r1820319 = y;
        double r1820320 = r1820318 * r1820319;
        double r1820321 = 1.0;
        double r1820322 = r1820321 - r1820319;
        double r1820323 = r1820320 * r1820322;
        return r1820323;
}

double f(double x, double y) {
        double r1820324 = y;
        double r1820325 = x;
        double r1820326 = r1820324 * r1820325;
        double r1820327 = -r1820324;
        double r1820328 = r1820326 * r1820327;
        double r1820329 = 1.0;
        double r1820330 = r1820326 * r1820329;
        double r1820331 = r1820328 + r1820330;
        return r1820331;
}

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