Average Error: 0.1 → 0.1
Time: 15.9s
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 r79257 = x;
        double r79258 = 1.0;
        double r79259 = y;
        double r79260 = r79257 * r79259;
        double r79261 = r79258 - r79260;
        double r79262 = r79257 * r79261;
        return r79262;
}

double f(double x, double y) {
        double r79263 = x;
        double r79264 = 1.0;
        double r79265 = y;
        double r79266 = r79263 * r79265;
        double r79267 = r79264 - r79266;
        double r79268 = r79263 * r79267;
        return r79268;
}

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