genBits: small addition to random API + largely new implementation that needs code review

Ryan Newton rrnewton at gmail.com
Wed Jun 29 19:41:48 CEST 2011


>
> Still, for a very cheap source generating on a larger interval than you
> desired one, it likely wouldn't compete with the classic modulus, test, and
> throw away and repeat if not acceptable approach.  Way more flexible
> though.
>

This was educational.  I didn't know that approach was "classic".  I used it
because it seemed intuitive and I checked and saw that GMP does the same
thing for *mpz_urandomm*.

But I like the idea of using that leftover randomness!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/libraries/attachments/20110629/aab81ed2/attachment.htm>


More information about the Libraries mailing list