From owner-freebsd-current Mon Oct 7 10:36:56 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id KAA12945 for current-outgoing; Mon, 7 Oct 1996 10:36:56 -0700 (PDT) Received: from sovcom.kiae.su (sovcom.kiae.su [193.125.152.1]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id KAA12936; Mon, 7 Oct 1996 10:36:49 -0700 (PDT) Received: by sovcom.kiae.su id AA07011 (5.65.kiae-1 ); Mon, 7 Oct 1996 20:22:03 +0300 Received: by sovcom.KIAE.su (UUMAIL/2.0); Mon, 7 Oct 96 20:22:03 +0300 Received: (from ache@localhost) by nagual.ru (8.7.6/8.7.3) id VAA01227; Mon, 7 Oct 1996 21:20:33 +0400 (MSD) Message-Id: <199610071720.VAA01227@nagual.ru> Subject: Re: I plan to change random() for -current (was Re: rand() and random()) In-Reply-To: <199610070056.RAA13128@phaeton.artisoft.com> from "Terry Lambert" at "Oct 6, 96 05:56:37 pm" To: terry@lambert.org (Terry Lambert) Date: Mon, 7 Oct 1996 21:20:32 +0400 (MSD) Cc: terry@lambert.org, joerg_wunsch@uriah.heep.sax.de, freebsd-hackers@FreeBSD.org, current@FreeBSD.org, bde@zeta.org.au (Bruce Evans) From: "=?KOI8-R?Q?=E1=CE=C4=D2=C5=CA_=FE=C5=D2=CE=CF=D7?=" (Andrey A. Chernov) Organization: self X-Class: Fast X-Mailer: ELM [version 2.4ME+ PL28 (25)] Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-current@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk > > > 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 http://www.nagual.ru/~ache/