home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / windows / x / 20799 < prev    next >
Encoding:
Internet Message Format  |  1993-01-06  |  1.4 KB

  1. Xref: sparky comp.windows.x:20799 comp.lang.c:19290
  2. Path: sparky!uunet!gatech!destroyer!ncar!noao!arizona!azhao
  3. From: azhao@cs.arizona.edu (Qiang Alex Zhao)
  4. Newsgroups: comp.windows.x,comp.lang.c
  5. Subject: Universal random number generator better than just rand()
  6. Message-ID: <29257@optima.cs.arizona.edu>
  7. Date: 6 Jan 93 06:16:15 GMT
  8. Sender: news@cs.arizona.edu
  9. Followup-To: comp.windows.x
  10. Organization: Computer Science Dept, Univ of Arizona, Tucson
  11. Lines: 31
  12.  
  13. Hi there,
  14.  
  15. Concerning about ANSI-C and POSIX portability of a program, I'm looking
  16. for a "universal" random number generator. It must be better than just
  17. rand().
  18.  
  19. Suppose I'm using <X11/Xfuncproto.h> and <X11/Xos.h> -- then what? Do
  20. all System V platforms have drad48() kind of functions? Can anybody
  21. tell me an easy way to distinguish different kind of machines in this
  22. aspect so that I can do:
  23.  
  24.     #if "something"
  25.     /* use drand48(), etc. */
  26.     #else if "something"
  27.     /* use random(), etc. */
  28.     #else
  29.     /* better not use, rand(), etc. */
  30.     #endif
  31.  
  32. Now I only know:
  33.     Sequent DYNIX has random(), etc.
  34.     SunOS has both series.
  35.     SGI IRIX has both series.
  36.  
  37. How about other systems?
  38.  
  39. -- 
  40. = Qiang Alex Zhao                 ___       .             ______
  41.   Computer Science Dept          /   )     /|   )          __//  )
  42.   University of Arizona         /   /     /_|  / _        //    /_  _. ._
  43.   azhao@cs.arizona.edu         (__)(_o   /  (_(_(-'_)(   ((____/ (_(_(_(_)
  44.