Average Error: 0.1 → 0.1
Time: 21.2s
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 r63376 = x;
        double r63377 = 1.0;
        double r63378 = y;
        double r63379 = r63376 * r63378;
        double r63380 = r63377 - r63379;
        double r63381 = r63376 * r63380;
        return r63381;
}

double f(double x, double y) {
        double r63382 = x;
        double r63383 = 1.0;
        double r63384 = y;
        double r63385 = r63382 * r63384;
        double r63386 = r63383 - r63385;
        double r63387 = r63382 * r63386;
        return r63387;
}

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