Average Error: 0.1 → 0.1
Time: 13.8s
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 r50861 = x;
        double r50862 = 1.0;
        double r50863 = y;
        double r50864 = r50861 * r50863;
        double r50865 = r50862 - r50864;
        double r50866 = r50861 * r50865;
        return r50866;
}

double f(double x, double y) {
        double r50867 = x;
        double r50868 = 1.0;
        double r50869 = y;
        double r50870 = r50867 * r50869;
        double r50871 = r50868 - r50870;
        double r50872 = r50867 * r50871;
        return r50872;
}

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