Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
* denormalized numbers on alpha
@ 1999-03-31  5:00 Martin Kuball
  1999-04-06  4:00 ` Stefan Schwarzer
  0 siblings, 1 reply; 2+ messages in thread
From: Martin Kuball @ 1999-03-31  5:00 UTC (permalink / raw)


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




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: denormalized numbers on alpha
  1999-03-31  5:00 denormalized numbers on alpha Martin Kuball
@ 1999-04-06  4:00 ` Stefan Schwarzer
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Schwarzer @ 1999-04-06  4:00 UTC (permalink / raw)


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



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1999-04-06  4:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-03-31  5:00 denormalized numbers on alpha Martin Kuball
1999-04-06  4:00 ` Stefan Schwarzer

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