Average Error: 0.1 → 0.1
Time: 13.0s
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 r59008 = x;
        double r59009 = 1.0;
        double r59010 = y;
        double r59011 = r59008 * r59010;
        double r59012 = r59009 - r59011;
        double r59013 = r59008 * r59012;
        return r59013;
}

double f(double x, double y) {
        double r59014 = x;
        double r59015 = 1.0;
        double r59016 = y;
        double r59017 = r59014 * r59016;
        double r59018 = r59015 - r59017;
        double r59019 = r59014 * r59018;
        return r59019;
}

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