home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.windows.x:20799 comp.lang.c:19290
- Path: sparky!uunet!gatech!destroyer!ncar!noao!arizona!azhao
- From: azhao@cs.arizona.edu (Qiang Alex Zhao)
- Newsgroups: comp.windows.x,comp.lang.c
- Subject: Universal random number generator better than just rand()
- Message-ID: <29257@optima.cs.arizona.edu>
- Date: 6 Jan 93 06:16:15 GMT
- Sender: news@cs.arizona.edu
- Followup-To: comp.windows.x
- Organization: Computer Science Dept, Univ of Arizona, Tucson
- Lines: 31
-
- Hi there,
-
- Concerning about ANSI-C and POSIX portability of a program, I'm looking
- for a "universal" random number generator. It must be better than just
- rand().
-
- Suppose I'm using <X11/Xfuncproto.h> and <X11/Xos.h> -- then what? Do
- all System V platforms have drad48() kind of functions? Can anybody
- tell me an easy way to distinguish different kind of machines in this
- aspect so that I can do:
-
- #if "something"
- /* use drand48(), etc. */
- #else if "something"
- /* use random(), etc. */
- #else
- /* better not use, rand(), etc. */
- #endif
-
- Now I only know:
- Sequent DYNIX has random(), etc.
- SunOS has both series.
- SGI IRIX has both series.
-
- How about other systems?
-
- --
- = Qiang Alex Zhao ___ . ______
- Computer Science Dept / ) /| ) __// )
- University of Arizona / / /_| / _ // /_ _. ._
- azhao@cs.arizona.edu (__)(_o / (_(_(-'_)( ((____/ (_(_(_(_)
-