www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/12/25/01:04:37

Date: Mon, 25 Dec 1995 07:50:04 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Geoffrey Wong <gwong AT cse DOT unsw DOT edu DOT au>
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. 

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019