Average Error: 0.1 → 0.1
Time: 8.8s
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 r72521 = x;
        double r72522 = 1.0;
        double r72523 = y;
        double r72524 = r72521 * r72523;
        double r72525 = r72522 - r72524;
        double r72526 = r72521 * r72525;
        return r72526;
}

double f(double x, double y) {
        double r72527 = x;
        double r72528 = 1.0;
        double r72529 = y;
        double r72530 = r72527 * r72529;
        double r72531 = r72528 - r72530;
        double r72532 = r72527 * r72531;
        return r72532;
}

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