How to generate different random numbers?
Karl Hasselström
kha at treskal.com
Wed Feb 1 10:42:38 CET 2006
On 2006-02-01 10:06:20 +0200, Forum Joiner wrote:
> I know how to generate numbers from 1 to 2^10, but how to get
> numbers only in the 2^9 ... 2^10 interval? I don't want to filter
> the numbers from 1 to 2^10, rather I want to generate directly only
> numbers from 2^9 ... 2^10 interval.
If x is in the interval 0..(2^9 - 1), then 2^9 + x is in the interval
2^9..(2^10 - 1).
--
Karl Hasselström, kha at treskal.com
www.treskal.com/kalle
More information about the gmp-discuss
mailing list