Xref: utzoo comp.sys.transputer:1890 comp.lang.fortran:3418 Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!mcsun!ukc!keele!cca04 From: cca04@.uk.ac.keele (P.J. Mitchell) Newsgroups: comp.sys.transputer,comp.lang.fortran Subject: Random numbers Message-ID: <483@keele.keele.ac.uk> Date: 23 Jul 90 13:11:19 GMT Sender: news@seq1.keele.ac.uk Organization: University of Keele, Keele, STAFFS. ST5 5BG Lines: 18 I am using Meiko's mf77 and it doesn't come with a library of C-like functions such as chdir, chown, mkdir etc. Therefore I have been writing a small library of fortran wrappers for these routines to ease calling them from fortran. My problem is that C has the two routines srand and rand. The latter returning an integer in the range 0-32767 (0 -> (2^15)-1). If I am to maintain compatibility with other unix fortrans then I have to make rand, drand and irand which are 31, 31 and 63 bits respectively. How do I generate this accuracy from the 15 bit C rand routine that the Sequent man pages say is used ? Any help netters ? -- --Paul Mitchell (CMA N.Cheshire, DoD#0145) | Computer Centre, JANET: cca04@uk.ac.keele.seq1 | University of Keele, Keele, USENET: cca04@seq1.keele.ac.uk@nss.cs.ucl.ac.uk | Staffordshire, ST5 5BG, U.K. BITNET: cca04%seq1.keele.ac.uk@ukacrl | 0782 - 621111 ext 3302