Average Error: 0.1 → 0.1
Time: 13.7s
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 r1385416 = x;
        double r1385417 = y;
        double r1385418 = r1385416 * r1385417;
        double r1385419 = 1.0;
        double r1385420 = r1385419 - r1385417;
        double r1385421 = r1385418 * r1385420;
        return r1385421;
}

double f(double x, double y) {
        double r1385422 = y;
        double r1385423 = x;
        double r1385424 = r1385422 * r1385423;
        double r1385425 = -r1385422;
        double r1385426 = r1385424 * r1385425;
        double r1385427 = 1.0;
        double r1385428 = r1385424 * r1385427;
        double r1385429 = r1385426 + r1385428;
        return r1385429;
}

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