Date: Mon, 25 Dec 1995 07:50:04 +0200 (IST) From: Eli Zaretskii To: Geoffrey Wong Cc: djgpp AT sun DOT soe DOT clarkson DOT edu Subject: Re: random() On Sun, 24 Dec 1995, Geoffrey Wong wrote: > I noticed that drand48() doesn't work under DOS, so I used random() > instead but my problem is that random() keep giving me Floating point > exceptions. > What do I need to do to get th code complied under DOS. > Also random() give the result zero under Unix, is that right? Please post the code fragment where you call random() and the stack dump message printed when the floating point exception hits. I think there might be something wrong with the way you use random(), because it should work both under DOS and Unix, and it surely should return a non-zero result.