home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / c / 16836 < prev    next >
Encoding:
Text File  |  1992-11-19  |  1.3 KB  |  26 lines

  1. Newsgroups: comp.lang.c
  2. Path: sparky!uunet!cis.ohio-state.edu!zaphod.mps.ohio-state.edu!moe.ksu.ksu.edu!mimbres.cs.unm.edu!constellation!osuunx.ucc.okstate.edu!datacomm.ucc.okstate.edu!martin
  3. From: martin@datacomm.ucc.okstate.edu (Martin McCormick)
  4. Subject: Using erand48
  5. Message-ID: <1992Nov19.215037.18995@osuunx.ucc.okstate.edu>
  6. Sender: news@osuunx.ucc.okstate.edu (USENET News System)
  7. Nntp-Posting-Host: datacomm.ucc.okstate.edu
  8. Organization: Oklahoma State University, Stillwater, OK
  9. Date: Thu, 19 Nov 1992 21:50:37 GMT
  10. Lines: 14
  11.  
  12.  
  13. I am a novice C programmer trying to use the rand48 family of functions.
  14. I don't know how wide-spread these functions are, but they exist on a Sun
  15. Sparc and also on a Dec running Untrix.  What I would really like to see is
  16. an example of code, using this function since I am having trouble deciphering
  17. the man page to figure out exactly what I need to feed it in order to seed
  18. the function.  The erand48 function returns a floating-point value between
  19. 0 and 1 which is exactly the type of output I want since that can be multiplied
  20. by a constant to produce an upper limit.  
  21.     The erand48 function requires storage for the X value, but I am
  22. lost as to what else is needed.  Thank you for any help.
  23.  
  24. Martin McCormick WB5AGZ   Stillwater, OK
  25. O.S.U. Computer Center Data Communications Group
  26.