Average Error: 0.1 → 0.1
Time: 13.4s
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 r75235 = x;
        double r75236 = 1.0;
        double r75237 = y;
        double r75238 = r75235 * r75237;
        double r75239 = r75236 - r75238;
        double r75240 = r75235 * r75239;
        return r75240;
}

double f(double x, double y) {
        double r75241 = x;
        double r75242 = 1.0;
        double r75243 = y;
        double r75244 = r75241 * r75243;
        double r75245 = r75242 - r75244;
        double r75246 = r75241 * r75245;
        return r75246;
}

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