Average Error: 0.1 → 0.1
Time: 5.0s
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 r80348 = x;
        double r80349 = 1.0;
        double r80350 = y;
        double r80351 = r80348 * r80350;
        double r80352 = r80349 - r80351;
        double r80353 = r80348 * r80352;
        return r80353;
}

double f(double x, double y) {
        double r80354 = x;
        double r80355 = 1.0;
        double r80356 = y;
        double r80357 = r80354 * r80356;
        double r80358 = r80355 - r80357;
        double r80359 = r80354 * r80358;
        return r80359;
}

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