Average Error: 0.1 → 0.1
Time: 16.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 r66188 = x;
        double r66189 = 1.0;
        double r66190 = y;
        double r66191 = r66188 * r66190;
        double r66192 = r66189 - r66191;
        double r66193 = r66188 * r66192;
        return r66193;
}

double f(double x, double y) {
        double r66194 = x;
        double r66195 = 1.0;
        double r66196 = y;
        double r66197 = r66194 * r66196;
        double r66198 = r66195 - r66197;
        double r66199 = r66194 * r66198;
        return r66199;
}

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