A Simple Algorithm for Evaluating Positive Values of the Function xy