Average Error: 0.1 → 0.1
Time: 9.7s
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 r57940 = x;
        double r57941 = 1.0;
        double r57942 = y;
        double r57943 = r57940 * r57942;
        double r57944 = r57941 - r57943;
        double r57945 = r57940 * r57944;
        return r57945;
}

double f(double x, double y) {
        double r57946 = x;
        double r57947 = 1.0;
        double r57948 = y;
        double r57949 = r57946 * r57948;
        double r57950 = r57947 - r57949;
        double r57951 = r57946 * r57950;
        return r57951;
}

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