diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2011-12-21 14:32:53 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2011-12-21 14:32:53 -0800 |
commit | 13a8820a0979787bd16f530a400da69c798e954e (patch) | |
tree | 11ce45249c04ba37fa13ae965a1220be810dba5d | |
parent | 28a3dc321c180dd708867406d3c2c5cc45b586e4 (diff) | |
download | txr-13a8820a0979787bd16f530a400da69c798e954e.tar.gz txr-13a8820a0979787bd16f530a400da69c798e954e.tar.bz2 txr-13a8820a0979787bd16f530a400da69c798e954e.zip |
* rand.c: Added comment about source of algorithm.
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | rand.c | 4 |
2 files changed, 8 insertions, 0 deletions
@@ -1,5 +1,9 @@ 2011-12-21 Kaz Kylheku <kaz@kylheku.com> + * rand.c: Added comment about source of algorithm. + +2011-12-21 Kaz Kylheku <kaz@kylheku.com> + * rand.c (random): Bugfix: not building up sufficiently large bignums. Work properly when mp_digit is smaller than 32 bits. @@ -49,6 +49,10 @@ typedef unsigned int rand32_t; typedef unsigned long rand32_t; #endif +/* + * The algorithm here is WELL 512. + * (Francois Panneton, Pierre L'Ecuyer.) + */ struct random_state { rand32_t state[16]; int cur; |