Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!usc!jarthur!nntp-server.caltech.edu!coil!manning From: manning@coil.caltech.edu (Evan Marshall Manning) Newsgroups: comp.lang.c Subject: Re: random() error in Turbo C++ Message-ID: Date: 10 Sep 90 00:20:39 GMT References: <118662@linus.mitre.org> <17607@haddock.ima.isc.com> <1990Sep8.201520.15916@diku.dk> <1990Sep9.224536.17707@zoo.toronto.edu> Sender: news@laguna.ccsf.caltech.edu Organization: California Institute of Technology Lines: 16 henry@zoo.toronto.edu (Henry Spencer) writes: >The original Unix rand() did a 32-bit calculation internally and returned >the HIGH-order 16 bits. Unfortunately, certain idiots porting the system >to 32-bit machines wanted a 32-bit rand() and didn't bother understanding >why it was done the way it was... Modern coding practice might suggest the use of comments in the source code to prevent such accidents :-( *************************************************************************** Your eyes are weary from staring at the CRT for so | Evan M. Manning long. You feel sleepy. Notice how restful it is | is to watch the cursor blink. Close your eyes. The |manning@gap.cco.caltech.edu opinions stated above are yours. You cannot | manning@mars.jpl.nasa.gov imagine why you ever felt otherwise. | gleeper@tybalt.caltech.edu