Average Error: 0.1 → 0.1
Time: 14.9s
Precision: 64
\[\left(x \cdot y\right) \cdot \left(1.0 - y\right)\]
\[\left(x \cdot y\right) \cdot \left(-y\right) + \left(x \cdot y\right) \cdot 1.0\]
\left(x \cdot y\right) \cdot \left(1.0 - y\right)
\left(x \cdot y\right) \cdot \left(-y\right) + \left(x \cdot y\right) \cdot 1.0
double f(double x, double y) {
        double r1739539 = x;
        double r1739540 = y;
        double r1739541 = r1739539 * r1739540;
        double r1739542 = 1.0;
        double r1739543 = r1739542 - r1739540;
        double r1739544 = r1739541 * r1739543;
        return r1739544;
}

double f(double x, double y) {
        double r1739545 = x;
        double r1739546 = y;
        double r1739547 = r1739545 * r1739546;
        double r1739548 = -r1739546;
        double r1739549 = r1739547 * r1739548;
        double r1739550 = 1.0;
        double r1739551 = r1739547 * r1739550;
        double r1739552 = r1739549 + r1739551;
        return r1739552;
}

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-lft-in0.1

    \[\leadsto \color{blue}{\left(x \cdot y\right) \cdot 1.0 + \left(x \cdot y\right) \cdot \left(-y\right)}\]
  5. Final simplification0.1

    \[\leadsto \left(x \cdot y\right) \cdot \left(-y\right) + \left(x \cdot y\right) \cdot 1.0\]

Reproduce

herbie shell --seed 2019163 
(FPCore (x y)
  :name "Statistics.Distribution.Binomial:$cvariance from math-functions-0.1.5.2"
  (* (* x y) (- 1.0 y)))