genBits: small addition to random API + largely new implementation that needs code review
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
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...
More information about the Libraries