Average Error: 0.1 → 0.1
Time: 2.4s
Precision: 64
\[\left(x \cdot y\right) \cdot \left(1 - y\right)\]
\[\left(x \cdot y\right) \cdot 1 + \left(x \cdot y\right) \cdot \left(-y\right)\]
\left(x \cdot y\right) \cdot \left(1 - y\right)
\left(x \cdot y\right) \cdot 1 + \left(x \cdot y\right) \cdot \left(-y\right)
double f(double x, double y) {
        double r24803 = x;
        double r24804 = y;
        double r24805 = r24803 * r24804;
        double r24806 = 1.0;
        double r24807 = r24806 - r24804;
        double r24808 = r24805 * r24807;
        return r24808;
}

double f(double x, double y) {
        double r24809 = x;
        double r24810 = y;
        double r24811 = r24809 * r24810;
        double r24812 = 1.0;
        double r24813 = r24811 * r24812;
        double r24814 = -r24810;
        double r24815 = r24811 * r24814;
        double r24816 = r24813 + r24815;
        return r24816;
}

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

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

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

Reproduce

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