Average Error: 0.1 → 0.1
Time: 14.3s
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 r62291 = x;
        double r62292 = 1.0;
        double r62293 = y;
        double r62294 = r62291 * r62293;
        double r62295 = r62292 - r62294;
        double r62296 = r62291 * r62295;
        return r62296;
}

double f(double x, double y) {
        double r62297 = x;
        double r62298 = 1.0;
        double r62299 = y;
        double r62300 = r62297 * r62299;
        double r62301 = r62298 - r62300;
        double r62302 = r62297 * r62301;
        return r62302;
}

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