Average Error: 0.1 → 0.1
Time: 43.2s
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 r1514145 = x;
        double r1514146 = y;
        double r1514147 = r1514145 * r1514146;
        double r1514148 = 1.0;
        double r1514149 = r1514148 - r1514146;
        double r1514150 = r1514147 * r1514149;
        return r1514150;
}

double f(double x, double y) {
        double r1514151 = y;
        double r1514152 = x;
        double r1514153 = r1514151 * r1514152;
        double r1514154 = -r1514151;
        double r1514155 = r1514153 * r1514154;
        double r1514156 = 1.0;
        double r1514157 = r1514153 * r1514156;
        double r1514158 = r1514155 + r1514157;
        return r1514158;
}

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