Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!zaphod.mps.ohio-state.edu!think.com!linus!linus!gateway.mitre.org!ads From: ads@gateway.mitre.org (Alexas D. Skucas) Newsgroups: comp.lang.c++ Subject: Random number generation Message-ID: <1991Mar11.151610.1984@linus.mitre.org> Date: 11 Mar 91 15:16:10 GMT Sender: news@linus.mitre.org (News Service) Reply-To: ads@gateway.mitre.org (Alexas D. Skucas) Organization: The Mitre Corporation Lines: 11 Nntp-Posting-Host: gateway.mitre.org Here is a C++ problem that is really giving me headaches. I am trying to generate a random number between 0 and 1. The rand function returns a huge number (i.e 3.75658e+08) which I can't seem to be able to deal with. I am running the Sun CC compiler. ANY help would be extremely appreciated. Thanks. Alex ads@gateway.mitre.org