[comp.lang.c] Checking for overflow with doubles

ron@nbife.NBI.COM (Ron Schweikert) (07/01/89)

My apologies if this has already been discussed, I haven't seen it.  I am
working with a person who is writing an apl interpreter and posed a question
I cannot answer.  Besides this apl interpreter, he's writing other programs
and needs to check for computation overflow with doubles. 

He noted that Aix and Xenix say they
do send signals for this.  His equipment is a 68020 box running Unix 4.2 with
the standard Berkley compiler.  The Green Hills compiler available on some of
our other equipment *may* do this (the trapv code seems to be implemented in
some places, excluded in others etc.).  Doesn't really matter, he doesn't 
have it anyway, I just included it as an FYI in case I get a question from
someone with that config.  

Anyway, the gist of my question:  what programming technique do you use to
alert you to the overflow problem?  For integers we have SIGFPE, nothing for
doubles that I can find.  

(If this is really simple, 'common-knowledge', flame on!  That's how I learn!)
(I've already RTFM'd as much as I can!!).

Thanks for your assistance.  Please e-mail responses.
-- 
Ron Schweikert
303/444-5710 x5026
{allegra,ucbvax,ncar,isieng}!nbires!hardy!nbife!ron