Average Error: 0.1 → 0.1
Time: 5.0s
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 r120319 = x;
        double r120320 = 1.0;
        double r120321 = y;
        double r120322 = r120319 * r120321;
        double r120323 = r120320 - r120322;
        double r120324 = r120319 * r120323;
        return r120324;
}

double f(double x, double y) {
        double r120325 = x;
        double r120326 = 1.0;
        double r120327 = y;
        double r120328 = r120325 * r120327;
        double r120329 = r120326 - r120328;
        double r120330 = r120325 * r120329;
        return r120330;
}

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