Average Error: 0.1 → 0.1
Time: 17.9s
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 r5409799 = x;
        double r5409800 = 1.0;
        double r5409801 = y;
        double r5409802 = r5409799 * r5409801;
        double r5409803 = r5409800 - r5409802;
        double r5409804 = r5409799 * r5409803;
        return r5409804;
}

double f(double x, double y) {
        double r5409805 = x;
        double r5409806 = 1.0;
        double r5409807 = y;
        double r5409808 = r5409805 * r5409807;
        double r5409809 = r5409806 - r5409808;
        double r5409810 = r5409805 * r5409809;
        return r5409810;
}

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