Average Error: 0.1 → 0.1
Time: 41.4s
Precision: 64
\[x \cdot \left(1 - x \cdot y\right)\]
\[\left(1 - x \cdot y\right) \cdot x\]
x \cdot \left(1 - x \cdot y\right)
\left(1 - x \cdot y\right) \cdot x
double f(double x, double y) {
        double r5105463 = x;
        double r5105464 = 1.0;
        double r5105465 = y;
        double r5105466 = r5105463 * r5105465;
        double r5105467 = r5105464 - r5105466;
        double r5105468 = r5105463 * r5105467;
        return r5105468;
}

double f(double x, double y) {
        double r5105469 = 1.0;
        double r5105470 = x;
        double r5105471 = y;
        double r5105472 = r5105470 * r5105471;
        double r5105473 = r5105469 - r5105472;
        double r5105474 = r5105473 * r5105470;
        return r5105474;
}

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 \left(1 - x \cdot y\right) \cdot x\]

Reproduce

herbie shell --seed 2019168 
(FPCore (x y)
  :name "Numeric.SpecFunctions:log1p from math-functions-0.1.5.2, A"
  (* x (- 1.0 (* x y))))