From owner-freebsd-current Sat Oct 5 13:58:52 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id NAA07796 for current-outgoing; Sat, 5 Oct 1996 13:58:52 -0700 (PDT) Received: from phaeton.artisoft.com (phaeton.Artisoft.COM [198.17.250.211]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id NAA07782; Sat, 5 Oct 1996 13:57:26 -0700 (PDT) Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id NAA11278; Sat, 5 Oct 1996 13:53:11 -0700 From: Terry Lambert Message-Id: <199610052053.NAA11278@phaeton.artisoft.com> Subject: Re: I plan to change random() for -current (was Re: rand() and random()) To: ache@nagual.ru (=?KOI8-R?Q?=E1=CE=C4=D2=C5=CA_=FE=C5=D2=CE=CF=D7?=) Date: Sat, 5 Oct 1996 13:53:11 -0700 (MST) Cc: joerg_wunsch@uriah.heep.sax.de, freebsd-hackers@freebsd.org, current@freebsd.org 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 X-Mailer: ELM [version 2.4 PL24] 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 > > 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.