Programmer's library for random numbers. Also random number generator testing code. Intended for simulation, games and "Monte-Carlo" algorithms.
Be the first to post a text review of gjrand random numbers. Rate and review a project by clicking thumbs up or thumbs down in the right column.
2009-03-18: New gjrand_shuffleprep() gjrand_shuffle1(). This provides an alternative way to do shuffling. Perhaps useful for very large shuffles that won't fit in memory. Quality and speed still questionable, but it does pass basic tests. testother/poker shuffle shuffle1 shuffle2 ; testunif/blatshuf1 test programs modified or newly written for gjrand_shuffle1(). 2009-03-13: Fixed testmisc/inits for new generator. gjrand_exponential() (new distribution). testother/poisson: mods to also test gjrand_exponential(). 2009-03-11: Over the last few days a total rewrite of the main generator. The good: Most functions slightly smaller and faster. A few much faster. I have tested damaged versions and i am sure this one has a large safety margin, as the last one did. It's still very non-linear, for those few non-crypto applications that need this. (But it is not non-linear enough for crypto work.) The bad: All generators now give a different sequence to before with the same seed (yet again). gjrand_seek() is gone because there's no easy way to do it for this generator. Sorry about this. Most legitimate uses of seek can be worked around using either gjrand_save()/gjrand_restore(), or gjrand_init4() instead. Of course this is annoying if you have an existing code base. You can keep using version 2.*, and i might even post updated versions of 2.* if anyone indicates they really need gjrand_seek(). The ugly: The oldrand and rand48 compatibility families are gone. At a pinch they could be implemented for the new generator. But they were a pain to maintain and of questionable usefulness. They will only come back if someone indicates they actually want them. The speed and code size is still a bit ugly on 32 bit machines. Go 64 bit if you can :-) Tests of the deleted functions are also deleted. 2009-03-04: Fixed false alarm "counts too low" in testother/poisson . 2009-02-24: Fixed potentially uninitialised variables in testunif/selfcor.c 2009-02-11: logfac.c : stirling() minor code cleanup. inte.h : added #pragma's for GCC to make this stuff invisible outside the DLL. These make slightly better code for me. Can safely be commented out if they cause trouble. Also added compilation guards. 2009-02-06: gjrand_drand() and gjrand_drandv() now have 52 random bits followed by a 1. This means (assuming IEEE) both 0 and 1 are not possible results. This is nice for integrating near singularities for instance. May also be slightly smaller and faster. This also affects gjrand_drand48() and gjrand_erand48(). ldrand() now never returns 0 (or 1). Also produces up to 128 (was 96) bits absolute on machines with enough precision. IEEE has now defined a format with 112 (?) fraction bits so perhaps this is relevant for a small number of systems. These all now make (slightly) different sequences for the same seed as before. 2008-06-09 approx : posted version 2.1.0.0 on SourceForge.
2009-03-18: New gjrand_shuffleprep() gjrand_shuffle1(). This provides an alternative way to do shuffling. Perhaps useful for very large shuffles that won't fit in memory. Quality and speed still questionable, but it does pass basic tests. testother/poker shuffle shuffle1 shuffle2 ; testunif/blatshuf1 test programs modified or newly written for gjrand_shuffle1(). 2009-03-13: Fixed testmisc/inits for new generator. gjrand_exponential() (new distribution). testother/poisson: mods to also test gjrand_exponential(). 2009-03-11: Over the last few days a total rewrite of the main generator. The good: Most functions slightly smaller and faster. A few much faster. I have tested damaged versions and i am sure this one has a large safety margin, as the last one did. It's still very non-linear, for those few non-crypto applications that need this. (But it is not non-linear enough for crypto work.) The bad: All generators now give a different sequence to before with the same seed (yet again). gjrand_seek() is gone because there's no easy way to do it for this generator. Sorry about this. Most legitimate uses of seek can be worked around using either gjrand_save()/gjrand_restore(), or gjrand_init4() instead. Of course this is annoying if you have an existing code base. You can keep using version 2.*, and i might even post updated versions of 2.* if anyone indicates they really need gjrand_seek(). The ugly: The oldrand and rand48 compatibility families are gone. At a pinch they could be implemented for the new generator. But they were a pain to maintain and of questionable usefulness. They will only come back if someone indicates they actually want them. The speed and code size is still a bit ugly on 32 bit machines. Go 64 bit if you can :-) Tests of the deleted functions are also deleted. 2009-03-04: Fixed false alarm "counts too low" in testother/poisson . 2009-02-24: Fixed potentially uninitialised variables in testunif/selfcor.c 2009-02-11: logfac.c : stirling() minor code cleanup. inte.h : added #pragma's for GCC to make this stuff invisible outside the DLL. These make slightly better code for me. Can safely be commented out if they cause trouble. Also added compilation guards. 2009-02-06: gjrand_drand() and gjrand_drandv() now have 52 random bits followed by a 1. This means (assuming IEEE) both 0 and 1 are not possible results. This is nice for integrating near singularities for instance. May also be slightly smaller and faster. This also affects gjrand_drand48() and gjrand_erand48(). ldrand() now never returns 0 (or 1). Also produces up to 128 (was 96) bits absolute on machines with enough precision. IEEE has now defined a format with 112 (?) fraction bits so perhaps this is relevant for a small number of systems. These all now make (slightly) different sequences for the same seed as before. 2008-06-09 approx : posted version 2.1.0.0 on SourceForge.
This is the gjrand changelog from the start to version 3.0.0 .
This is the gjrand changelog from the start to version 3.0.0 .
Be the first person to add a text review.
Copyright © 2009 Geeknet, Inc. All rights reserved. Terms of Use
Thanks for your rating!
Would you also like to write a review?