Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 5 Oct 1996 13:53:11 -0700 (MST)
From:      Terry Lambert <terry@lambert.org>
To:        ache@nagual.ru (=?KOI8-R?Q?=E1=CE=C4=D2=C5=CA_=FE=C5=D2=CE=CF=D7?=)
Cc:        joerg_wunsch@uriah.heep.sax.de, freebsd-hackers@freebsd.org, current@freebsd.org
Subject:   Re: I plan to change random() for -current (was Re: rand() and random())
Message-ID:  <199610052053.NAA11278@phaeton.artisoft.com>
In-Reply-To: <199610050835.MAA00671@nagual.ru> from "=?KOI8-R?Q?=E1=CE=C4=D2=C5=CA_=FE=C5=D2=CE=CF=D7?=" at Oct 5, 96 12:35:20 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> > I don't think so.  But they are much better with random().  See xmine,
> > if you wanna get a nice example.  It generates totally predictable
> > layouts when using rand().
> 
> Totally predictable layouts not rand() illness only but random() too.
> It not depends well on different initial state, producing the same
> sequence. I finally dig out initial posting (below).
> 
> IMHO we need to change our random() as suggested.

There is a historical dependence of much physics code on the
repeatability of identical seeding for the linear congruential
generator as a "randomness" base for repeatable Monte Carlo based
testing of relativistically invariant P-P, N-P, and N-N pair production
collisions.

Such collisions are used to test "allowability" of given target states
using the soloutions of multiple Feynman-Dyson diagrams as constraints
on the resulting pairs (velocity, direction, angular momentum, etc.).

The idea is that the real world has more constraints on allowable
pair production events than simple relatavistic invariance.

If you *do* change the random algorithms, then you should *leave the
rand48() code along*.  I can not stress this enough.  You will damage
repeatability of experiments for which source code is unavailable, and
only the results remain.

This is only *one* example of a real dependence on the algorithm used
to implement random functions.  Please be sure that you are not damaging
anything in your zeal to "correct" thjis problem.


					Terry Lambert
					terry@lambert.org
---
Any opinions in this posting are my own and not those of my present
or previous employers.



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