Average Error: 0.1 → 0.1
Time: 2.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 r48700 = x;
        double r48701 = 1.0;
        double r48702 = y;
        double r48703 = r48700 * r48702;
        double r48704 = r48701 - r48703;
        double r48705 = r48700 * r48704;
        return r48705;
}

double f(double x, double y) {
        double r48706 = x;
        double r48707 = 1.0;
        double r48708 = y;
        double r48709 = r48706 * r48708;
        double r48710 = r48707 - r48709;
        double r48711 = r48706 * r48710;
        return r48711;
}

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