Path: utzoo!attcan!uunet!samsung!usc!ucsd!ucbvax!bloom-beacon!eru!hagbard!sunic!news.funet.fi!tukki.jyu.fi!tukki!tt From: tt@euler.jyu.fi (Tapani Tarvainen) Newsgroups: comp.sys.hp Subject: RAND_MAX in stdlib.h is wrong (HP-UX 7.0) Message-ID: Date: 14 Oct 90 16:17:39 GMT Sender: news@tukki.jyu.fi (News articles) Organization: University of Jyvaskyla Lines: 15 In-Reply-To: ian@dms.cdc.com's message of 13 Oct 90 19:28:21 GMT Just a quick note in case anybody should happen to use code like $include ... (double)rand()/RAND_MAX the definition of RAND_MAX in stdlib.h is wrong: # define RAND_MAX 32763 whereas it should be 32767. (This is in HP-UX 7.0; earlier releases didn't have RAND_MAX defined at all, newer ones I don't know about.) -- Tapani Tarvainen (tarvaine@jyu.fi, tarvainen@finjyu.bitnet)