Date: Sun, 1 Aug 1999 11:26:35 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: Clemens Valens cc: djgpp AT delorie DOT com Subject: Re: how about "more" random ? In-Reply-To: <933323259.1410@www.remarq.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Fri, 30 Jul 1999, Clemens Valens wrote: > I think the difference is due to limited wordlength, which > means rounding errors and overflow. For instance, when you > multiply by 100 before deviding, you can have an overflow. In principle, yes; but not in this case. The largest value that rand() can return is approximately 2e9, and multiplying it by 100 after conversion to a double will never overflow, since even 1e308 won't overflow a double.