From: buers AT gmx DOT de (Dieter Buerssner) Newsgroups: comp.os.msdos.djgpp Subject: Re: SIGFPE Date: 11 Feb 2000 10:10:50 GMT Lines: 22 Message-ID: <880n79$jush$1@fu-berlin.de> References: <200002101809 DOT SAA01894 AT burdock DOT restall DOT net> NNTP-Posting-Host: 195.252.187.196 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: fu-berlin.de 950263850 654225 195.252.187.196 (16 [17104]) X-Posting-Agent: Hamster/1.3.8.0 User-Agent: Xnews/2.11.08 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com djgpp AT delorie DOT com (Peter Restall) wrote in <200002101809 DOT SAA01894 AT burdock DOT restall DOT net>: > 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. This might cause your problem. (I think it is very unfortunate, that this often used idom - divide only when the divisor != 0 - can fail, but it really can fail, in the sense that the result will be an unexpected Infinity, that may trigger an exception.) You should compile your program with debugging information (-g) and 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. Regards, Dieter