Average Error: 0.1 → 0.1
Time: 51.1s
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 r3161396 = x;
        double r3161397 = 1.0;
        double r3161398 = y;
        double r3161399 = r3161396 * r3161398;
        double r3161400 = r3161397 - r3161399;
        double r3161401 = r3161396 * r3161400;
        return r3161401;
}

double f(double x, double y) {
        double r3161402 = 1.0;
        double r3161403 = x;
        double r3161404 = y;
        double r3161405 = r3161403 * r3161404;
        double r3161406 = r3161402 - r3161405;
        double r3161407 = r3161406 * r3161403;
        return r3161407;
}

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