Average Error: 0.1 → 0.1
Time: 4.6s
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 r82711 = x;
        double r82712 = 1.0;
        double r82713 = y;
        double r82714 = r82711 * r82713;
        double r82715 = r82712 - r82714;
        double r82716 = r82711 * r82715;
        return r82716;
}

double f(double x, double y) {
        double r82717 = x;
        double r82718 = 1.0;
        double r82719 = y;
        double r82720 = r82717 * r82719;
        double r82721 = r82718 - r82720;
        double r82722 = r82717 * r82721;
        return r82722;
}

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