Average Error: 0.1 → 0.1
Time: 15.2s
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 r61207 = x;
        double r61208 = 1.0;
        double r61209 = y;
        double r61210 = r61207 * r61209;
        double r61211 = r61208 - r61210;
        double r61212 = r61207 * r61211;
        return r61212;
}

double f(double x, double y) {
        double r61213 = x;
        double r61214 = 1.0;
        double r61215 = y;
        double r61216 = r61213 * r61215;
        double r61217 = r61214 - r61216;
        double r61218 = r61213 * r61217;
        return r61218;
}

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