Average Error: 0.1 → 0.1
Time: 8.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 r107119 = x;
        double r107120 = 1.0;
        double r107121 = y;
        double r107122 = r107119 * r107121;
        double r107123 = r107120 - r107122;
        double r107124 = r107119 * r107123;
        return r107124;
}

double f(double x, double y) {
        double r107125 = x;
        double r107126 = 1.0;
        double r107127 = y;
        double r107128 = r107125 * r107127;
        double r107129 = r107126 - r107128;
        double r107130 = r107125 * r107129;
        return r107130;
}

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