Average Error: 0.1 → 0.1
Time: 16.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 r60736 = x;
        double r60737 = 1.0;
        double r60738 = y;
        double r60739 = r60736 * r60738;
        double r60740 = r60737 - r60739;
        double r60741 = r60736 * r60740;
        return r60741;
}

double f(double x, double y) {
        double r60742 = x;
        double r60743 = 1.0;
        double r60744 = y;
        double r60745 = r60742 * r60744;
        double r60746 = r60743 - r60745;
        double r60747 = r60742 * r60746;
        return r60747;
}

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