Date: Sun, 13 Feb 2000 09:55:57 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Dieter Buerssner cc: djgpp AT delorie DOT com Subject: Re: SIGFPE In-Reply-To: <880n79$jush$1@fu-berlin.de> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 Precedence: bulk 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.