| This is a limitation, which precludes the usage of some clever
| generation algorithms needing e.g. a prime modulus, or introducing
| a computational overhead, most probably useless.

The generator knows its own 'internal' range
(e.g. your prime modulus).  All it needs to do is to generate
random numbers uniformly distributed in the range [minBound,maxBound].
(Actually, this has to be done with care; perhaps someone would
like to send a reference solution to this problem; it's easier than
the adaptive ones that have already been suggested.)

Mind you, to do this might take it several iterations, and these
iterations are wasted if the ultimate customer is then mapping
the [minBound,maxBound] range onto some smaller interval.
So perhaps you are right that there's a significant performance
cost to the minBound/maxBound story

Simon

Reply via email to