Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!CMUVM.BITNET!345EEQX From: 345EEQX@CMUVM.BITNET (Robert Devantier) Newsgroups: comp.sys.amiga Subject: Lattice Question Message-ID: <9002030633.AA27212@jade.berkeley.edu> Date: 3 Feb 90 05:19:03 GMT Sender: daemon@ucbvax.BERKELEY.EDU Lines: 30 I tried compiling the following code under Lattice C 5.04 (not a or b) and every time I run the program, I get a GURU of 4 or B. Is there something I am not implementing right, or what? I compile with the following command: 1.ram:> lc -Lm test The code looks like this (just want to print a random number 0<=x<1 /* Test.c - Prints a random number (well, I thought it would!) */ #include #include #include /* Required for drand48 */ main() { double x = drand48(); printf("The number is: %f.^n",x); } /* End of Test.c */ I do not call seed48, as page L45 says this "allows initialization of the internal 48-bit seed to something other than the default", and for right now the default would be just fine. Please respond directly to the below address, and I will summarize to the need is present. Many thanks to anyone that can help! ----------------------------------------------------------------- Robert Devantier | 345EEQX@CMUVM.Bitnet | Student Programmer Central Michigan University | {!Amiga!} | Computer Services "It doesn't matter what I think, they'll sue me for what I said."