[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: useful additional procedure for random bytes?




Bengt,

> perhaps a list (of specified length), with integers 0-255 as items,
> would be the most versatile value of such a procedure.

Nice proposal! Unfortunately, there is no such thing as a "byte"
in Scheme. Hence, the portable way to get bytes (e.g. to be written
to a file as in the confidence tests) is (random (expt 2 32)) and then
decomposing the number into its bytes with modulo and quotient.
This is slow and clumsy.

I will think about it.

Sebastian.