1. In an electronic design automation (EDA) software tool in a computer, a method for assigning random values to a set of random variables, the method comprising: the EDA software tool in the computer receiving a set of constraints, wherein each constraint is defined over one or more random variables from the set of random variables, wherein the set of constraints includes one or more modulo constraints that use a modulo operator; the EDA software tool in the computer rewriting the set of constraints to obtain a new set of constraints, wherein said rewriting includes replacing at least one modulo constraint whose divisor is not equal to a power of two with one or more non-modulo constraints, wherein the one or more non-modulo constraints use only non-modulo operators, and wherein the one or more non-modulo constraints use at least one random variable other than those used in the modulo constraint; and the EDA software tool in the computer assigning random values to the set of random variables based on the new set of constraints, wherein the EDA software tool in the computer uses the set of random variables to generate one or more random stimuli to perform functional verification on a circuit design under verification.