Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site brl-tgr.ARPA Path: utzoo!linus!philabs!cmcl2!seismo!brl-tgr!tgr!gwyn@BRL.ARPA From: gwyn@BRL.ARPA (VLD/VMB) Newsgroups: net.lang.c Subject: Re: Random Numbers Message-ID: <43@brl-tgr.ARPA> Date: Sat, 20-Jul-85 23:49:12 EDT Article-I.D.: brl-tgr.43 Posted: Sat Jul 20 23:49:12 1985 Date-Received: Mon, 22-Jul-85 03:58:46 EDT Sender: news@brl-tgr.ARPA Lines: 12 You are right -- there is no way to generate "really" random numbers in a deterministic manner. Indeed, defining what is meant by "random number" is not easy. The classic reference for these matters is Donald Kunth's "The Art of Computer Programming, Vol. 2: Seminumerical Algorithms", 2nd. Ed. (Addison-Wesley, 1981). Most people in practice use a library function like rand() and "seed" it (via srand()) with a number unique to the process invocation, such as the XOR of the time-of-day and the process ID. Be warned that most implementations of rand() do not generate very good random sequences!