Average Error: 0.1 → 0.1
Time: 10.9s
Precision: 64
\[x \cdot \left(1 - x \cdot y\right)\]
\[x \cdot \left(1 - x \cdot y\right)\]
x \cdot \left(1 - x \cdot y\right)
x \cdot \left(1 - x \cdot y\right)
double f(double x, double y) {
        double r74876 = x;
        double r74877 = 1.0;
        double r74878 = y;
        double r74879 = r74876 * r74878;
        double r74880 = r74877 - r74879;
        double r74881 = r74876 * r74880;
        return r74881;
}

double f(double x, double y) {
        double r74882 = x;
        double r74883 = 1.0;
        double r74884 = y;
        double r74885 = r74882 * r74884;
        double r74886 = r74883 - r74885;
        double r74887 = r74882 * r74886;
        return r74887;
}

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

    \[x \cdot \left(1 - x \cdot y\right)\]
  2. Final simplification0.1

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

Reproduce

herbie shell --seed 2019291 
(FPCore (x y)
  :name "Numeric.SpecFunctions:log1p from math-functions-0.1.5.2, A"
  :precision binary64
  (* x (- 1 (* x y))))