Average Error: 0.1 → 0.1
Time: 8.6s
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 r59896 = x;
        double r59897 = 1.0;
        double r59898 = y;
        double r59899 = r59896 * r59898;
        double r59900 = r59897 - r59899;
        double r59901 = r59896 * r59900;
        return r59901;
}

double f(double x, double y) {
        double r59902 = x;
        double r59903 = 1.0;
        double r59904 = y;
        double r59905 = r59902 * r59904;
        double r59906 = r59903 - r59905;
        double r59907 = r59902 * r59906;
        return r59907;
}

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