It's aslo possible that I've missed the point.

Other places where this question was posed there is additional discussion suggesting that unsigned arithmetic needs to be performed on the random value after it is obtained. Without a broader description of the problem I'm not sure how much help we can offer.