Average Error: 0.1 → 0.1
Time: 17.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 r1486754 = x;
        double r1486755 = y;
        double r1486756 = r1486754 * r1486755;
        double r1486757 = 1.0;
        double r1486758 = r1486757 - r1486755;
        double r1486759 = r1486756 * r1486758;
        return r1486759;
}

double f(double x, double y) {
        double r1486760 = y;
        double r1486761 = x;
        double r1486762 = r1486760 * r1486761;
        double r1486763 = -r1486760;
        double r1486764 = r1486762 * r1486763;
        double r1486765 = 1.0;
        double r1486766 = r1486762 * r1486765;
        double r1486767 = r1486764 + r1486766;
        return r1486767;
}

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