Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 3 Oct 1996 18:51:29 +0400 (MSD)
From:      =?KOI8-R?Q?=E1=CE=C4=D2=C5=CA_=FE=C5=D2=CE=CF=D7?= (Andrey A. Chernov) <ache@nagual.ru>
To:        joerg_wunsch@uriah.heep.sax.de
Cc:        freebsd-hackers@freebsd.org, jmacd@CS.Berkeley.EDU
Subject:   Re: rand() and random()
Message-ID:  <199610031451.SAA00772@nagual.ru>
In-Reply-To: <199610031252.OAA26494@uriah.heep.sax.de> from "J Wunsch" at "Oct 3, 96 02:52:26 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
> I vote for killing the old rand().  Too many things (in particular,
> games) behave very stupid with it.

random() isn't good enough too. However the problem is different
with rand() case. The problem is that srandom() not accomodate
startup value well, i.e. produce the same _few_ sequences for _many_
different startup values. I remember bug report related to this problem
(with suggested random() replacement) somewhere in freebsd mailing
lists long time ago.

-- 
Andrey A. Chernov
<ache@nagual.ru>
http://www.nagual.ru/~ache/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199610031451.SAA00772>