Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 2 Feb 2003 19:41:17 +0000
From:      Edward Brocklesby <ejb@lythe.org.uk>
To:        Bakul Shah <bakul@bitblocks.com>
Cc:        current@FreeBSD.ORG
Subject:   Re: rand() is broken
Message-ID:  <200302021941.h12JfJ1a004169@a.smtp.serv.lythe.org.uk>
In-Reply-To: <200302021848.NAA19508@agamemnon.cnchost.com>
References:  <200302021848.NAA19508@agamemnon.cnchost.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sunday 02 February 2003 6:48 pm, Bakul Shah wrote:
> Guys, please realize that random() is also used in generating
> simulation inputs (or timing or whatever).  If you go change
> the underlying algorithm or its parameters one can't generate
> the same sequence from the same seed when repeating a test.

Maybe I missed something, but why cannot you just rip random() from libc, 
rename it to bakul_shah_random() and use that in your testing code?  Then you 
are safe from any changes to random(), and indeed have a portable RNG if your 
host OS changes.

Regards,
Edward.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




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