Average Error: 0.1 → 0.1
Time: 8.3s
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 r104795 = x;
        double r104796 = 1.0;
        double r104797 = y;
        double r104798 = r104795 * r104797;
        double r104799 = r104796 - r104798;
        double r104800 = r104795 * r104799;
        return r104800;
}

double f(double x, double y) {
        double r104801 = x;
        double r104802 = 1.0;
        double r104803 = y;
        double r104804 = r104801 * r104803;
        double r104805 = r104802 - r104804;
        double r104806 = r104801 * r104805;
        return r104806;
}

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