From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 6484 invoked from network); 20 Jun 1999 23:06:00 -0000 Received: from mail.redhat.com (199.183.24.239) by lists.redhat.com with SMTP; 20 Jun 1999 23:05:59 -0000 Received: from paralleldata.com (smtp.paralleldata.com [38.153.145.2]) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id SAA00634 for ; Sun, 20 Jun 1999 18:12:15 -0400 Received: by paralleldata.com from localhost (router,SLMail V2.5); Sun, 20 Jun 1999 17:16:21 -0500 Received: by paralleldata.com from paralleldata.com (207.158.98.129::mail daemon; unverified,SLMail V2.5); Sun, 20 Jun 1999 17:16:19 -0500 Sender: "Wsb" Message-ID: <376D5A59.E107E95F@paralleldata.com> Date: Sun, 20 Jun 1999 16:17:13 -0500 From: "Wes Bauske" Organization: PDS Inc. X-Mailer: Mozilla 4.51 [en] (X11; I; Linux 2.2.5-15 i686) X-Accept-Language: en MIME-Version: 1.0 To: axp-list@redhat.com Subject: Re: fp exceptions References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit glenn murphy wrote: > > I'm sorry if any of my questions are FAQs. I'm just learning to program, > and I get a lot of floating point exceptions at runtime with code that > runs fine on x86 systems. I'm using a 21064 (cabriolet) with RedHat 5.2. > Is this something specific to the 21064 that I need a compiler option for? > Is this a problem with egcs 1.0.3 that comes with RHL 5.2? If I upgrade > egcs, do I need to upgrade all the libs as well? Any help would be > greatly appreciated. > Well, there are a couple things to do. First, run the program under gdb and see why you get the FP exception. It is quite likely that you are accessing something you shouldn't be. The Intels don't show the problem because they force the bad numbers to zero or FLOATMAX, and happily continue on with the calculation. Now, sometimes this fixup is quite reasonable to do and so you let it go but Alphas are a bit more picky in that they expect all FP values to be normalized. So, it you think the results of your gdb run/examination are acceptable (meaning you don't want to fix the code to eliminate the problem) then you might try -mieee to force the Alphas to slow down and handle the oddball numbers in SW rather than HW. This still might not work if your FP exception is in a library routine though, like exp(). Wes