Average Error: 0.1 → 0.1
Time: 7.1s
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 r74109 = x;
        double r74110 = 1.0;
        double r74111 = y;
        double r74112 = r74109 * r74111;
        double r74113 = r74110 - r74112;
        double r74114 = r74109 * r74113;
        return r74114;
}

double f(double x, double y) {
        double r74115 = x;
        double r74116 = 1.0;
        double r74117 = y;
        double r74118 = r74115 * r74117;
        double r74119 = r74116 - r74118;
        double r74120 = r74115 * r74119;
        return r74120;
}

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