On 05/28/2015 12:55 PM, Kon Lovett wrote: > The integer result range extends to that of the limit parameter. Ex:
Yeah sorry, I didn't see that the first time, my bad. (random-integer large-bignum) would produce a large bignum just fine. Problem solved! But did you take a look at the (random-large-integer) module in -numbers? What they do is multiply a bignum by a bignum of its digit size (max of a fixnum), then add random to the new empty digit, and then iterate. I don't want to prematurely optimize or anything, but that's a REALLY slow way to build up a sequence of digits in a bignum. Both the guarantee of the multiple being digit-aligned, and the knowledge of how many digits beforehand, are completely lost with that method, which has to assume the multiple could be anything, and can't pre-allocate anything. A u8vector->number or perhaps set-bignum-digit! function could build the resulting bignum much faster, if the numbers module supported anything like that. _______________________________________________ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users