www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/02/06/11:00:17

Date: Thu, 6 Feb 1997 17:47:21 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: kagel AT dg1 DOT bloomberg DOT com
cc: myskin AT inp DOT nsk DOT su, djgpp AT delorie DOT com
Subject: Re: double-->int: What's wrong here?
In-Reply-To: <9702061523.AA26361@quasar.bloomberg.com >
Message-ID: <Pine.SUN.3.91.970206174102.5706K-100000@is>
MIME-Version: 1.0

On Thu, 6 Feb 1997 kagel AT quasar DOT bloomberg DOT com wrote:

>    Are you sure?  Did you run that small test program with and without + 0.5?
>    If not, please do.  I'm pretty sure it will help.
> 
> Same exact results.  BTW I am testing on a DG using GCC I am not home to test
> DJGPP on my Cyrix 686 so this may be the difference in internal precision
> between the x87 and M88100's MMU.

x87 is weird, and its DJGPP setup is not necessarily the most correct 
one.  The code should be run on a PC to be sure.

> I'm just saying we do not now enough yet to
> dismiss this guy's problem as sloppy floating point source code.

I didn't say ``sloppy''.  I just wanted to convey my general experience 
that being defensive about FP computations is much more productive than 
digging deep into the mysteries of x87 trying to understand who is to 
blame (although there was a time when I did my share of such digging).

> (BTW I agree with your recommendation in the general case, though, I 
> usually use 0.505 as an error correction value.)

That's for second-graders ;-).  First, people need to be convinced to add 
any value at all.

- Raw text -


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