Average Error: 0.1 → 0.1
Time: 14.1s
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 r52691 = x;
        double r52692 = 1.0;
        double r52693 = y;
        double r52694 = r52691 * r52693;
        double r52695 = r52692 - r52694;
        double r52696 = r52691 * r52695;
        return r52696;
}

double f(double x, double y) {
        double r52697 = x;
        double r52698 = 1.0;
        double r52699 = y;
        double r52700 = r52697 * r52699;
        double r52701 = r52698 - r52700;
        double r52702 = r52697 * r52701;
        return r52702;
}

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 2019326 
(FPCore (x y)
  :name "Numeric.SpecFunctions:log1p from math-functions-0.1.5.2, A"
  :precision binary64
  (* x (- 1 (* x y))))