Average Error: 0.1 → 0.1
Time: 17.2s
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 r72769 = x;
        double r72770 = 1.0;
        double r72771 = y;
        double r72772 = r72769 * r72771;
        double r72773 = r72770 - r72772;
        double r72774 = r72769 * r72773;
        return r72774;
}

double f(double x, double y) {
        double r72775 = x;
        double r72776 = 1.0;
        double r72777 = y;
        double r72778 = r72775 * r72777;
        double r72779 = r72776 - r72778;
        double r72780 = r72775 * r72779;
        return r72780;
}

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