irandom
(require irandom) | package: irandom |
Racket implementation of Bob Jenkins’ ISAAC pseudo-random number generator.
At the moment, this module requires racket CS variant running on a 64-bit platform.
ISAAC: a fast cryptographic random number generator
"ISAAC (Indirection, Shift, Accumulate, Add, and Count) generates 32-bit random numbers. ... Cycles are guaranteed to be at least 240 values long, and they are 28295 values long on average. The results are uniformly distributed, unbiased, and unpredictable unless you know the seed."
Output of this implementation has been tested with output of the original source for conformity
and correctness, as well as the
dieharder random number
generator test suit and passes all the tests —
1 Random Numbers
procedure
(irandom-context? v) → boolean
v : any/c
procedure
(make-irandom-context) → irandom-context
parameter
(current-irandom-context context) → void? context : irandom-context?
procedure
procedure
(irandom-32) → fixnum?
procedure
(irandom-bytes n) → bytes?
n : (and/c fixnum? (>=/c 0))
procedure
(irandom-list-32 n) → list?
n : (and/c fixnum? (>=/c 0))
procedure
(irandom-fxvector n) → fxvector?
n : (and/c fixnum? (>=/c 0))
procedure
(irandom-fxvector-32 n) → fxvector?
n : (and/c fixnum? (>=/c 0))
procedure
(irandom-flvector n) → flvector?
n : (and/c fixnum? (>=/c 0))
procedure
(irandom-u32vector n) → u32vector?
n : (and/c fixnum? (>=/c 0))
procedure
(irandom-u64vector n) → u64vector?
n : (and/c fixnum? (>=/c 0))
procedure
(irandom-f64vector n) → f64vector?
n : (and/c fixnum? (>=/c 0))
2 Random UUID Generation
(require irandom/uuid) | package: irandom |
Following bindings are exported by both irandom, and irandom/uuid.
procedure
(uuid-string) → (and/c string? immutable?)
procedure
(uuid-bytes) → (and/c bytes? immutable?)
procedure
(uuid-string? v) → boolean?
v : any/c