From: Andreas Johansson <ajo@wopr.campus.luth.se>
Subject: Re: Sun Letter Revised Draft ( Wheres My Alpha! )
Date: Wed, 9 Apr 1997 18:24:41 +0200 (CEST) [thread overview]
Message-ID: <4ad558073faf2920b0ee836f5572b676.axp-list@archive.invalid> (raw)
In-Reply-To: <Pine.LNX.3.95.970409121229.521B-100000@shell.ncm.com>
On Wed, 9 Apr 1997, Randy Chapman wrote:
> Good question, I forgot to post the failure:
> nova:~> gcc -ieee testieee.c -lm -lieee
> nova:~> ./a.out
> about to divide 1.0 by 0.0
> GOT AN FPE!
> result: 0
> about to assign HUGE_VAL to a float
> GOT AN FPE!
> about to print that float
> Inf is 0
> nova:~>
>
> Basically, we are getting SIGFPE's... which will kill the program if I
> don't catch them. What I would like is either a way to get them not even
> generated, or info on how to get the correct result and return it when
> they are.
>
> Thanks,
> --randy
Someone recently wrote this, but since it seems you haven't seen it, the
option to gcc is -mieee, not -ieee. This atleast makes some difference to
your program in the HUGE_VAL assignment:
ajo@nova ~ >gcc -mieee testieee.c -lm -lieee
ajo@nova ~ >a.out
about to divide 1.0 by 0.0
GOT AN FPE!
result: 0
about to assign HUGE_VAL to a float
about to print that float
Inf is Inf
--
<-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=->
: E-mail: ajo@wopr.campus.luth.se :
: S-mail: Andreas Johansson, Karhusvagen 5 6:618, 977 54 Lulea, SWEDEN :
: Have you had your dose of 261.62 BogoMIPS today? - Run Alpha! :
<-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=->
--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject. Do not send it to axp-list@redhat.com
next parent reply other threads:[~1997-04-09 16:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Pine.LNX.3.95.970409121229.521B-100000@shell.ncm.com>
1997-04-09 16:24 ` Andreas Johansson [this message]
1997-04-09 17:52 Sun Letter Revised Draft ( Wheres My Alpha! ) Randy Chapman
-- strict thread matches above, loose matches on Subject: below --
1997-04-09 16:31 Jim Paradis
[not found] <Pine.A32.3.95.970409110746.66090D-100000@argent.tkg.com>
1997-04-09 16:15 ` Randy Chapman
1997-04-09 16:10 Jim Paradis
[not found] <334B8F08.2E88@voicenet.com>
1997-04-09 14:45 ` Randy Chapman
1997-04-09 12:43 Uncle George
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