Average Error: 0.1 → 0.1
Time: 11.9s
Precision: 64
\[\left(x \cdot y\right) \cdot \left(1 - y\right)\]
\[\left(\left(1 - y\right) \cdot x\right) \cdot y\]
\left(x \cdot y\right) \cdot \left(1 - y\right)
\left(\left(1 - y\right) \cdot x\right) \cdot y
double f(double x, double y) {
        double r1551013 = x;
        double r1551014 = y;
        double r1551015 = r1551013 * r1551014;
        double r1551016 = 1.0;
        double r1551017 = r1551016 - r1551014;
        double r1551018 = r1551015 * r1551017;
        return r1551018;
}

double f(double x, double y) {
        double r1551019 = 1.0;
        double r1551020 = y;
        double r1551021 = r1551019 - r1551020;
        double r1551022 = x;
        double r1551023 = r1551021 * r1551022;
        double r1551024 = r1551023 * r1551020;
        return r1551024;
}

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. Taylor expanded around 0 5.1

    \[\leadsto \color{blue}{1 \cdot \left(x \cdot y\right) - x \cdot {y}^{2}}\]
  6. Simplified0.1

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

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

Reproduce

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