From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <4ad558073faf2920b0ee836f5572b676.axp-list@archive.invalid> X-Archive-Original-Message-ID: <199704091600.MAA03538@alpha0.estabrook.org> Date: Wed, 9 Apr 1997 18:24:41 +0200 (CEST) From: Andreas Johansson Subject: Re: Sun Letter Revised Draft ( Wheres My Alpha! ) In-Reply-To: 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