Average Error: 0.1 → 0.1
Time: 10.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 r83060 = x;
        double r83061 = 1.0;
        double r83062 = y;
        double r83063 = r83060 * r83062;
        double r83064 = r83061 - r83063;
        double r83065 = r83060 * r83064;
        return r83065;
}

double f(double x, double y) {
        double r83066 = x;
        double r83067 = 1.0;
        double r83068 = y;
        double r83069 = r83066 * r83068;
        double r83070 = r83067 - r83069;
        double r83071 = r83066 * r83070;
        return r83071;
}

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