delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/02/13/03:28:54

Date: Sun, 13 Feb 2000 09:55:57 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Dieter Buerssner <buers AT gmx DOT de>
cc: djgpp AT delorie DOT com
Subject: Re: SIGFPE
In-Reply-To: <880n79$jush$1@fu-berlin.de>
Message-ID: <Pine.SUN.3.91.1000213095538.29873N-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: dj-admin AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On 11 Feb 2000, Dieter Buerssner wrote:

> >     if (c != 0.0)
> >     {
> >          temp  = 1.0 / c;
> 
> The last statement may overflow (to Infinity), and thus may cause
> a floating point exception, i.e when c is a subnormal/denormal 
> number.

Not in DJGPP v2.02 and later (but since the original poster seems to
use v2.01, it's possible in this case).  In latest versions of DJGPP,
Infinity never causes an exception, it just results in all subsequent
results being Inf, NaN, or zero.

What exactly do you mean by ``subnormal'', btw?  I know about
denormals and unnormals (the latter can only happen if the program has
a bug), but I don't think I've ever heard of subnormals.

> execute it with fsdb. Set a breakpoint at the start of
> this offending function, and single step through the function,
> while looking at the NPX pane. This should give you some hints.

GDB also supports FP registers, so this can be done with GDB or RHIDE
as well.

- Raw text -


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