Average Error: 0.1 → 0.1
Time: 13.5s
Precision: 64
\[x \cdot \left(1.0 - x \cdot y\right)\]
\[\left(1.0 - x \cdot y\right) \cdot x\]
x \cdot \left(1.0 - x \cdot y\right)
\left(1.0 - x \cdot y\right) \cdot x
double f(double x, double y) {
        double r4169390 = x;
        double r4169391 = 1.0;
        double r4169392 = y;
        double r4169393 = r4169390 * r4169392;
        double r4169394 = r4169391 - r4169393;
        double r4169395 = r4169390 * r4169394;
        return r4169395;
}

double f(double x, double y) {
        double r4169396 = 1.0;
        double r4169397 = x;
        double r4169398 = y;
        double r4169399 = r4169397 * r4169398;
        double r4169400 = r4169396 - r4169399;
        double r4169401 = r4169400 * r4169397;
        return r4169401;
}

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.0 - x \cdot y\right)\]
  2. Final simplification0.1

    \[\leadsto \left(1.0 - x \cdot y\right) \cdot x\]

Reproduce

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