Average Error: 0.1 → 0.1
Time: 14.3s
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 r48236 = x;
        double r48237 = 1.0;
        double r48238 = y;
        double r48239 = r48236 * r48238;
        double r48240 = r48237 - r48239;
        double r48241 = r48236 * r48240;
        return r48241;
}

double f(double x, double y) {
        double r48242 = x;
        double r48243 = 1.0;
        double r48244 = y;
        double r48245 = r48242 * r48244;
        double r48246 = r48243 - r48245;
        double r48247 = r48242 * r48246;
        return r48247;
}

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