Average Error: 0.1 → 0.1
Time: 15.8s
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 r24711 = x;
        double r24712 = y;
        double r24713 = r24711 * r24712;
        double r24714 = 1.0;
        double r24715 = r24714 - r24712;
        double r24716 = r24713 * r24715;
        return r24716;
}

double f(double x, double y) {
        double r24717 = x;
        double r24718 = 1.0;
        double r24719 = y;
        double r24720 = r24718 - r24719;
        double r24721 = r24717 * r24720;
        double r24722 = r24721 * r24719;
        return r24722;
}

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 add-cube-cbrt0.4

    \[\leadsto \left(x \cdot y\right) \cdot \left(1 - \color{blue}{\left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right) \cdot \sqrt[3]{y}}\right)\]
  4. Applied add-cube-cbrt0.4

    \[\leadsto \left(x \cdot y\right) \cdot \left(\color{blue}{\left(\sqrt[3]{1} \cdot \sqrt[3]{1}\right) \cdot \sqrt[3]{1}} - \left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right) \cdot \sqrt[3]{y}\right)\]
  5. Applied prod-diff0.4

    \[\leadsto \left(x \cdot y\right) \cdot \color{blue}{\left(\mathsf{fma}\left(\sqrt[3]{1} \cdot \sqrt[3]{1}, \sqrt[3]{1}, -\sqrt[3]{y} \cdot \left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right)\right) + \mathsf{fma}\left(-\sqrt[3]{y}, \sqrt[3]{y} \cdot \sqrt[3]{y}, \sqrt[3]{y} \cdot \left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right)\right)\right)}\]
  6. Applied distribute-lft-in0.4

    \[\leadsto \color{blue}{\left(x \cdot y\right) \cdot \mathsf{fma}\left(\sqrt[3]{1} \cdot \sqrt[3]{1}, \sqrt[3]{1}, -\sqrt[3]{y} \cdot \left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right)\right) + \left(x \cdot y\right) \cdot \mathsf{fma}\left(-\sqrt[3]{y}, \sqrt[3]{y} \cdot \sqrt[3]{y}, \sqrt[3]{y} \cdot \left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right)\right)}\]
  7. Simplified0.1

    \[\leadsto \color{blue}{\left(x \cdot \left(1 - y\right)\right) \cdot y} + \left(x \cdot y\right) \cdot \mathsf{fma}\left(-\sqrt[3]{y}, \sqrt[3]{y} \cdot \sqrt[3]{y}, \sqrt[3]{y} \cdot \left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right)\right)\]
  8. Simplified0.1

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

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

Reproduce

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