Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Oct 1996 21:20:32 +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:        terry@lambert.org (Terry Lambert)
Cc:        terry@lambert.org, joerg_wunsch@uriah.heep.sax.de, freebsd-hackers@FreeBSD.org, current@FreeBSD.org, bde@zeta.org.au (Bruce Evans)
Subject:   Re: I plan to change random() for -current (was Re: rand() and random())
Message-ID:  <199610071720.VAA01227@nagual.ru>
In-Reply-To: <199610070056.RAA13128@phaeton.artisoft.com> from "Terry Lambert" at "Oct 6, 96 05:56:37 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
> > > 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.
> > 
> > The fix _not_ breaks repeatability of identical seeding.
> 
> Repeatability means identical results compared to historical values
> for the same interface.

We must follow standards and not some bad programmer practice.
The fix I mean confirm standards. The thing you want not described
in any standard and no more that bad programmer assumption.

> The code in question is from the Berkeley Physics package, in FORTRAN,
> for generation of relativitically invariant pair production events.
> 
> I would be happy if you would keep BSD compatability, since BSD UNIX is
> where the code was written to run.

I suspect (I'll try to check it in near time) that BSD random()
change its formulae in BSD lifetime.

> The particular code in question uses the 48 bit linear congruential
> method.  However, it is reasonable to presume that similar code exists
> for any given interface dependency.

rand48 family is different thing which I not plan to touch.

> you want a different (not better) random distribution than what you
> currently get.

I don't change random distribution at all with this fix, please
look at it more carefully. I change only initial seeding behaviour.

> I respectfully suggest that you should consider packing around your
> own random number generator with the code that needs the different
> distribution, rather than munging the existing code.  Historical
> behaviour of pseudo-random library services is a topic requiring a
> *lot* of care before changes are introduced.  I really haven't seen
> what I would consider enough thought or discussion to merit a change.
> 
> As always: my opinions.

Well, it sounds like "golden code" syndrome....
We already do this thing before and I don't see your complaints.
I mean Bruce's fixes to math library precision f.e.
All math calculations which uses affected function will produce
different results! All physic experiments becomes not-repeatable!
Etc. And you keep silence it that case I don't understand why.

-- 
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?199610071720.VAA01227>