Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: Stefan Schwarzer <sts@boa.ica1.uni-stuttgart.de>
Subject: Re: denormalized numbers on alpha
Date: 1999/04/06	[thread overview]
Message-ID: <7edfpp$rlf$1@infosun2.rus.uni-stuttgart.de> (raw)
In-Reply-To: 37020715.2519B581@zedo.fuedo.de

Martin Kuball <kuball@zedo.fuedo.de> 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



      reply	other threads:[~1999-04-06  4:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-03-31  5:00 denormalized numbers on alpha Martin Kuball
1999-04-06  4:00 ` Stefan Schwarzer [this message]
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox