From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,80f29101c7f99087 X-Google-Attributes: gid1164f8,public From: Stefan Schwarzer Subject: Re: denormalized numbers on alpha Date: 1999/04/06 Message-ID: <7edfpp$rlf$1@infosun2.rus.uni-stuttgart.de>#1/1 X-Deja-AN: 463306875 References: <37020715.2519B581@zedo.fuedo.de> Organization: ICA 1, Stuttgart University User-Agent: tin/pre-1.4-971224 (UNIX) (SunOS/5.7 (sun4u)) Newsgroups: comp.sys.dec Martin Kuball wrote: > Hi! > I have the problem that comparing 0 with 0 (and other aritmethic > operations involving 0) gives a floating point exception when compiled > with gcc. Someone told me that this has to do with the handling of > denormalized numbers. How can I get rid of this? > Martin Kuball I encounter the problem myself rather frequently and so far it has given me always hints where to look for sloppy initialization of variables... or other rather lazy coding practices wrt to floating point numbers. So, my first suggestion is using the debugger to verify that you are really prepared to accept the reason for the exception. But of course that's not answering your question. 'man ieee' gives you a lot more info on how to finetune the behavior with DEC compilers and also give you things to try to produce the desired behavior (I have not tried this myself). Then there is something which I don't recommend, but which I have used as a 'safety net' for 'debugged' applications which I could not afford to terminate on uncaught signals (and which at that -long ago- time did not compile with DEC's C++ own compiler): In desperation, I simply installed an own signal handler for SIG_FPE (in my case it was just incrementing a counter that told me in the end how many floating point exceptions had occured) Please don't cite me on the last paragraph... -- Stefan Schwarzer office: +49-(0)711-685-7606 fax: x-3658 Uni Stuttgart, ICA 1 e-mail: sts@ica1.uni-stuttgart.de Pfaffenwaldring 27 pgp public key available on request/finger 70569 Stuttgart, Germany http://www.ica1.uni-stuttgart.de/~sts