Average Error: 0.1 → 0.1
Time: 16.6s
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 r1556982 = x;
        double r1556983 = y;
        double r1556984 = r1556982 * r1556983;
        double r1556985 = 1.0;
        double r1556986 = r1556985 - r1556983;
        double r1556987 = r1556984 * r1556986;
        return r1556987;
}

double f(double x, double y) {
        double r1556988 = y;
        double r1556989 = x;
        double r1556990 = r1556988 * r1556989;
        double r1556991 = -r1556988;
        double r1556992 = r1556990 * r1556991;
        double r1556993 = 1.0;
        double r1556994 = r1556990 * r1556993;
        double r1556995 = r1556992 + r1556994;
        return r1556995;
}

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