module random: delay in "seeding"
Roman Suzi
rnd at onego.ru
Sat May 4 00:14:13 EDT 2002
I've noticed the following:
>>> import random
>>> random.seed(123)
>>> print random.gauss(12,12)
7.46167701922
>>> random.seed(123)
>>> print random.gauss(12,12)
-6.54391487521
>>> random.seed(123)
>>> print random.gauss(12,12)
7.46167701922
>>> random.seed(123)
>>> print random.gauss(12,12)
-6.54391487521
While it is quite understandable that normally distributed numbers
come in pairs, but I thought seed() resets the state of random module...
I think this sometimes can cause errors.
Sincerely yours, Roman Suzi
--
\_ Russia \_ Karelia \_ Petrozavodsk \_ rnd at onego.ru \_
\_ Friday, May 03, 2002 \_ Powered by Linux RedHat 7.2 \_
\_ "RENTAL CAR: The only *TRUE* all-terrain vehicle." \_
More information about the Python-list
mailing list