Average Error: 0.1 → 0.1
Time: 19.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 r10690957 = x;
        double r10690958 = 1.0;
        double r10690959 = y;
        double r10690960 = r10690957 * r10690959;
        double r10690961 = r10690958 - r10690960;
        double r10690962 = r10690957 * r10690961;
        return r10690962;
}

double f(double x, double y) {
        double r10690963 = x;
        double r10690964 = 1.0;
        double r10690965 = y;
        double r10690966 = r10690963 * r10690965;
        double r10690967 = r10690964 - r10690966;
        double r10690968 = r10690963 * r10690967;
        return r10690968;
}

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