Improve generation of pseudo-random integers. (#99720, Morten Welinder

2002-12-10  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

        * glib/grand.c (g_rand_int_range): Improve generation of
        pseudo-random integers. (#99720, Morten Welinder <terra@diku.dk>)

        * README.in, docs/reference/glib/running.sgml,
        docs/reference/glib/tmpl/random_numbers.sgml,
        docs/reference/glib/changes.sgml: Added notes about the new
        algorithm.

2CVS: ----------------------------------------------------------------------
This commit is contained in:
Sebastian Wilhelmi 2002-12-10 13:50:40 +00:00 committed by Sebastian Wilhelmi
parent 657428da90
commit 1c462ac694
10 changed files with 96 additions and 16 deletions

View File

@ -1,3 +1,13 @@
2002-12-10 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* glib/grand.c (g_rand_int_range): Improve generation of
pseudo-random integers. (#99720, Morten Welinder <terra@diku.dk>)
* README.in, docs/reference/glib/running.sgml,
docs/reference/glib/tmpl/random_numbers.sgml,
docs/reference/glib/changes.sgml: Added notes about the new
algorithm.
2002-12-09 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* configure.in: use 0 instead of $defattr, as it isn't defined

View File

@ -1,3 +1,13 @@
2002-12-10 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* glib/grand.c (g_rand_int_range): Improve generation of
pseudo-random integers. (#99720, Morten Welinder <terra@diku.dk>)
* README.in, docs/reference/glib/running.sgml,
docs/reference/glib/tmpl/random_numbers.sgml,
docs/reference/glib/changes.sgml: Added notes about the new
algorithm.
2002-12-09 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* configure.in: use 0 instead of $defattr, as it isn't defined

View File

@ -1,3 +1,13 @@
2002-12-10 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* glib/grand.c (g_rand_int_range): Improve generation of
pseudo-random integers. (#99720, Morten Welinder <terra@diku.dk>)
* README.in, docs/reference/glib/running.sgml,
docs/reference/glib/tmpl/random_numbers.sgml,
docs/reference/glib/changes.sgml: Added notes about the new
algorithm.
2002-12-09 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* configure.in: use 0 instead of $defattr, as it isn't defined

View File

@ -1,3 +1,13 @@
2002-12-10 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* glib/grand.c (g_rand_int_range): Improve generation of
pseudo-random integers. (#99720, Morten Welinder <terra@diku.dk>)
* README.in, docs/reference/glib/running.sgml,
docs/reference/glib/tmpl/random_numbers.sgml,
docs/reference/glib/changes.sgml: Added notes about the new
algorithm.
2002-12-09 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* configure.in: use 0 instead of $defattr, as it isn't defined

View File

@ -1,3 +1,13 @@
2002-12-10 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* glib/grand.c (g_rand_int_range): Improve generation of
pseudo-random integers. (#99720, Morten Welinder <terra@diku.dk>)
* README.in, docs/reference/glib/running.sgml,
docs/reference/glib/tmpl/random_numbers.sgml,
docs/reference/glib/changes.sgml: Added notes about the new
algorithm.
2002-12-09 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* configure.in: use 0 instead of $defattr, as it isn't defined

View File

@ -1,3 +1,13 @@
2002-12-10 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* glib/grand.c (g_rand_int_range): Improve generation of
pseudo-random integers. (#99720, Morten Welinder <terra@diku.dk>)
* README.in, docs/reference/glib/running.sgml,
docs/reference/glib/tmpl/random_numbers.sgml,
docs/reference/glib/changes.sgml: Added notes about the new
algorithm.
2002-12-09 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* configure.in: use 0 instead of $defattr, as it isn't defined

View File

@ -1,3 +1,13 @@
2002-12-10 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* glib/grand.c (g_rand_int_range): Improve generation of
pseudo-random integers. (#99720, Morten Welinder <terra@diku.dk>)
* README.in, docs/reference/glib/running.sgml,
docs/reference/glib/tmpl/random_numbers.sgml,
docs/reference/glib/changes.sgml: Added notes about the new
algorithm.
2002-12-09 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* configure.in: use 0 instead of $defattr, as it isn't defined

View File

@ -34,11 +34,16 @@ Notes about GLib-2.2.0
http://www.math.keio.ac.jp/~matumoto/emt.html
The original seeding algorithm, as found in GLib-2.0.x, can be used
instead of the new one by setting the environment variable
G_RANDOM_VERSION to the value of "2.0". Use the GLib-2.0 algorithm
only if you have sequences of numbers generated with Glib-2.0 that
you need to reproduce exactly.
Also the pseudo-random integers generated by g_rand_int_range and
g_random_int_range will have a slightly better equal distribution
with the new version of GLib.
The original algorithms, as found in GLib-2.0.x, can be used instead
of the new ones by setting the environment variable G_RANDOM_VERSION
to the value of "2.0".
Use the GLib-2.0 algorithms only if you have sequences of numbers
generated with Glib-2.0 that you need to reproduce exactly.
How to report bugs
==================

View File

@ -23,7 +23,10 @@ Incompatible changes made between successing versions of GLib
GLib changed the seeding algorithm for the pseudo-random number
generator Mersenne Twister, as used by <structname>GRand</structname>
and <structname>GRandom</structname>. This was necessary, because some
seeds would yield very bad pseudo-random streams.
seeds would yield very bad pseudo-random streams. Also the
pseudo-random integers generated by
<function>g_rand*_int_range()</function> will have a
slightly better equal distribution with the new version of GLib.
</para>
<para>
@ -33,12 +36,13 @@ url="http://www.math.keio.ac.jp/~matumoto/emt.html">http://www.math.keio.ac.jp/~
</para>
<para>
The original seeding algorithm, as found in GLib 2.0.x, can be used
instead of the new one by setting the environment variable
<envar>G_RANDOM_VERSION</envar> to the value of '2.0'. Use the
GLib-2.0 algorithm only if you have sequences of numbers generated
with Glib-2.0 that you need to reproduce exactly.
The original seeding and generation algorithms, as found in GLib
2.0.x, can be used instead of the new ones by setting the environment
variable <envar>G_RANDOM_VERSION</envar> to the value of '2.0'. Use
the GLib-2.0 algorithms only if you have sequences of numbers generated
with Glib-2.0 that you need to reproduce exactly.
</para>
</listitem>
</itemizedlist>

View File

@ -67,12 +67,13 @@ variables like <envar>LANG</envar>, <envar>PATH</envar> or <envar>HOME</envar>.
<para>
If this environment variable is set to '2.0', the outdated
pseudo-random number seeding algorithm from GLib-2.0 is used
instead of the new better one. Use the GLib-2.0 algorithm only if
you have sequences of numbers generated with Glib-2.0 that you
need to reproduce exactly.
</para>
pseudo-random number seeding and generation algorithms from
GLib-2.0 are used instead of the new better ones. Use the GLib-2.0
algorithms only if you have sequences of numbers generated with
Glib-2.0 that you need to reproduce exactly.
</para>
</formalpara>
</refsect2>
<refsect2>