This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: draft random-number-generator API


   Date: Thu, 03 Sep 1998 18:36:26 -0400
   From: Zack Weinberg <zack@rabi.phys.columbia.edu>

   You can get signed or unsigned 32-, 48-, or 64-bit integers with uniform
   distribution, or floats/doubles/long doubles in the ranges (-1, 1) or [0, 1)
   with uniform, normal, Poisson, ... distribution.

   ...

   You create a state block with another function, which takes a selector for
   the algorithm, an initial seed, and any tunable parameters.  It returns you
   a pointer to malloced memory.  You can reseed the block with yet another
   function, or set the default state block to one of your choosing.

I would like it also to have an interface to take bits of randomness
and cycle them into the function in the Right Way.  Various system's
/dev/random does this right; look in their kernels and read the papers
to understand it (I did that once, but could not reproduce the answer
here).  



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]