Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!husc6!cmcl2!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn ) Newsgroups: comp.lang.c Subject: Re: A Universal Random Number Generator. Message-ID: <9704@smoke.BRL.MIL> Date: 25 Feb 89 02:10:22 GMT References: <7354@pyr.gatech.EDU> <5873@bsu-cs.UUCP> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 14 In article <5873@bsu-cs.UUCP> dhesi@bsu-cs.UUCP (Rahul Dhesi) writes: -In article <7354@pyr.gatech.EDU> naras@stat.fsu.edu (B. Narasimhan) presents -a universal random number generator that includes the definitions: ->#define CONST_2 362436 ->#define CONST_3 7654321 ->#define CONST_4 16777213 -Better make these long, with an L suffix. Else some compilers I've -encountered will assume they are 16-bit ints, and truncate them -accordingly. Since that is in direct contradiction to K&R1's specs for integer constants, one could make a strong case that such a compiler is not worth using. Could you tell us whose compilers are thus broken, so we could steer clear of them?