Average Error: 0.1 → 0.1
Time: 5.1s
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 r77866 = x;
        double r77867 = 1.0;
        double r77868 = y;
        double r77869 = r77866 * r77868;
        double r77870 = r77867 - r77869;
        double r77871 = r77866 * r77870;
        return r77871;
}

double f(double x, double y) {
        double r77872 = x;
        double r77873 = 1.0;
        double r77874 = y;
        double r77875 = r77872 * r77874;
        double r77876 = r77873 - r77875;
        double r77877 = r77872 * r77876;
        return r77877;
}

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