Average Error: 0.1 → 0.1
Time: 17.7s
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 r49113 = x;
        double r49114 = 1.0;
        double r49115 = y;
        double r49116 = r49113 * r49115;
        double r49117 = r49114 - r49116;
        double r49118 = r49113 * r49117;
        return r49118;
}

double f(double x, double y) {
        double r49119 = x;
        double r49120 = 1.0;
        double r49121 = y;
        double r49122 = r49119 * r49121;
        double r49123 = r49120 - r49122;
        double r49124 = r49119 * r49123;
        return r49124;
}

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