| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
* rand.c (random): Add back missing declaration.
|
|
|
|
|
|
| |
arguments. This snuck through due to working with a C++ compiler.
(random): Fixed unused variable warning that happens on 32-bit-pointer
platforms.
|
|
|
|
|
|
| |
(make_random_state): After initializing, retrieve eight
random numbers to clear pathological initial behavior
leading to duplicate values.
|
|
|
|
|
|
|
|
| |
* arith.h (highest_bit): Declared.
* rand.c (random): Rewrote using different algorithm which
ensures even distribution, and avoids doing a bignum mod
operation.
|
|
|
|
|
| |
together. Otherwise for fixnum moduli, we get only a 32 bit number no
matter what the modulus is.
|
|
|
|
|
|
|
|
| |
* arith.h (normalize): Declared.
* rand.c (random): Bugfix: normalize the bignum before returning it.
* txr.1: Doc stubs for PRNG functionality.
|
| |
|
|
|
|
| |
Work properly when mp_digit is smaller than 32 bits.
|
|
* eval.c: Includes rand.h header.
(eval_init): New variable and functions from rand module registered.
* lib.c: Includes rand.h header.
(init): Call rand_init.
* rand.c: New file.
* rand.h: New file.
|