Average Error: 0.1 → 0.1
Time: 10.3s
Precision: 64
\[\left(x \cdot y\right) \cdot \left(1 - y\right)\]
\[\left(y \cdot x\right) \cdot \left(-y\right) + \left(y \cdot x\right) \cdot 1\]
\left(x \cdot y\right) \cdot \left(1 - y\right)
\left(y \cdot x\right) \cdot \left(-y\right) + \left(y \cdot x\right) \cdot 1
double f(double x, double y) {
        double r1464111 = x;
        double r1464112 = y;
        double r1464113 = r1464111 * r1464112;
        double r1464114 = 1.0;
        double r1464115 = r1464114 - r1464112;
        double r1464116 = r1464113 * r1464115;
        return r1464116;
}

double f(double x, double y) {
        double r1464117 = y;
        double r1464118 = x;
        double r1464119 = r1464117 * r1464118;
        double r1464120 = -r1464117;
        double r1464121 = r1464119 * r1464120;
        double r1464122 = 1.0;
        double r1464123 = r1464119 * r1464122;
        double r1464124 = r1464121 + r1464123;
        return r1464124;
}

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. Final simplification0.1

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

Reproduce

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