Average Error: 0.1 → 0.1
Time: 9.5s
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 r82056 = x;
        double r82057 = 1.0;
        double r82058 = y;
        double r82059 = r82056 * r82058;
        double r82060 = r82057 - r82059;
        double r82061 = r82056 * r82060;
        return r82061;
}

double f(double x, double y) {
        double r82062 = x;
        double r82063 = 1.0;
        double r82064 = y;
        double r82065 = r82062 * r82064;
        double r82066 = r82063 - r82065;
        double r82067 = r82062 * r82066;
        return r82067;
}

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