Average Error: 0.1 → 0.1
Time: 18.5s
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 r52831 = x;
        double r52832 = 1.0;
        double r52833 = y;
        double r52834 = r52831 * r52833;
        double r52835 = r52832 - r52834;
        double r52836 = r52831 * r52835;
        return r52836;
}

double f(double x, double y) {
        double r52837 = x;
        double r52838 = 1.0;
        double r52839 = y;
        double r52840 = r52837 * r52839;
        double r52841 = r52838 - r52840;
        double r52842 = r52837 * r52841;
        return r52842;
}

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