Average Error: 0.1 → 0.1
Time: 15.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 r52363 = x;
        double r52364 = 1.0;
        double r52365 = y;
        double r52366 = r52363 * r52365;
        double r52367 = r52364 - r52366;
        double r52368 = r52363 * r52367;
        return r52368;
}

double f(double x, double y) {
        double r52369 = x;
        double r52370 = 1.0;
        double r52371 = y;
        double r52372 = r52369 * r52371;
        double r52373 = r52370 - r52372;
        double r52374 = r52369 * r52373;
        return r52374;
}

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