Average Error: 0.1 → 0.1
Time: 15.6s
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 r80000 = x;
        double r80001 = 1.0;
        double r80002 = y;
        double r80003 = r80000 * r80002;
        double r80004 = r80001 - r80003;
        double r80005 = r80000 * r80004;
        return r80005;
}

double f(double x, double y) {
        double r80006 = x;
        double r80007 = 1.0;
        double r80008 = y;
        double r80009 = r80006 * r80008;
        double r80010 = r80007 - r80009;
        double r80011 = r80006 * r80010;
        return r80011;
}

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