Average Error: 0.1 → 0.1
Time: 15.2s
Precision: 64
\[\left(x \cdot y\right) \cdot \left(1 - y\right)\]
\[\left(x \cdot \left(1 - y\right)\right) \cdot y\]
\left(x \cdot y\right) \cdot \left(1 - y\right)
\left(x \cdot \left(1 - y\right)\right) \cdot y
double f(double x, double y) {
        double r28791 = x;
        double r28792 = y;
        double r28793 = r28791 * r28792;
        double r28794 = 1.0;
        double r28795 = r28794 - r28792;
        double r28796 = r28793 * r28795;
        return r28796;
}

double f(double x, double y) {
        double r28797 = x;
        double r28798 = 1.0;
        double r28799 = y;
        double r28800 = r28798 - r28799;
        double r28801 = r28797 * r28800;
        double r28802 = r28801 * r28799;
        return r28802;
}

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 pow10.1

    \[\leadsto \left(x \cdot y\right) \cdot \color{blue}{{\left(1 - y\right)}^{1}}\]
  4. Applied pow10.1

    \[\leadsto \left(x \cdot \color{blue}{{y}^{1}}\right) \cdot {\left(1 - y\right)}^{1}\]
  5. Applied pow10.1

    \[\leadsto \left(\color{blue}{{x}^{1}} \cdot {y}^{1}\right) \cdot {\left(1 - y\right)}^{1}\]
  6. Applied pow-prod-down0.1

    \[\leadsto \color{blue}{{\left(x \cdot y\right)}^{1}} \cdot {\left(1 - y\right)}^{1}\]
  7. Applied pow-prod-down0.1

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

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

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

Reproduce

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