Path: utzoo!attcan!uunet!lll-winken!csd4.milw.wisc.edu!bionet!ames!haven!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn ) Newsgroups: comp.lang.c Subject: Re: Random integers Message-ID: <9868@smoke.BRL.MIL> Date: 18 Mar 89 01:02:07 GMT References: <2686@sun.soe.clarkson.edu> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 8 In article <2686@sun.soe.clarkson.edu> tree@sun.soe.clarkson.edu (Tom Emerson) writes: >int k; >k = 10 * drand48(); >But to now avail; I get a number that looks similar to 2274665. Probably your only problem here is that you allowed the compiler to assume the default value type of int for the drand48() function; you need to declare that it returns a double.