Average Error: 0.1 → 0.1
Time: 13.4s
Precision: 64
\[x \cdot \left(1.0 - x \cdot y\right)\]
\[\left(1.0 - x \cdot y\right) \cdot x\]
x \cdot \left(1.0 - x \cdot y\right)
\left(1.0 - x \cdot y\right) \cdot x
double f(double x, double y) {
        double r3700752 = x;
        double r3700753 = 1.0;
        double r3700754 = y;
        double r3700755 = r3700752 * r3700754;
        double r3700756 = r3700753 - r3700755;
        double r3700757 = r3700752 * r3700756;
        return r3700757;
}

double f(double x, double y) {
        double r3700758 = 1.0;
        double r3700759 = x;
        double r3700760 = y;
        double r3700761 = r3700759 * r3700760;
        double r3700762 = r3700758 - r3700761;
        double r3700763 = r3700762 * r3700759;
        return r3700763;
}

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.0 - x \cdot y\right)\]
  2. Final simplification0.1

    \[\leadsto \left(1.0 - x \cdot y\right) \cdot x\]

Reproduce

herbie shell --seed 2019163 
(FPCore (x y)
  :name "Numeric.SpecFunctions:log1p from math-functions-0.1.5.2, A"
  (* x (- 1.0 (* x y))))