From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 12977 invoked from network); 6 Jan 1999 22:16:47 -0000 Received: from mail.redhat.com (199.183.24.239) by lists.redhat.com with SMTP; 6 Jan 1999 22:16:47 -0000 Received: from email.nist.gov (email.nist.gov [129.6.2.7]) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id QAA04132 for ; Wed, 6 Jan 1999 16:57:32 -0500 Received: from lurch.nist.gov (lurch.nist.gov [129.6.153.40]) by email.nist.gov (8.9.1/8.9.1) with ESMTP id QAA13401 for <@relay.nist.gov:axp-list@redhat.com>; Wed, 6 Jan 1999 16:56:16 -0500 (EST) Received: from nist.gov (lurch.nist.gov [129.6.153.40]) by lurch.nist.gov (980427.SGI.8.8.8/970903.SGI.AUTOCF) via ESMTP id QAA40192 for ; Wed, 6 Jan 1999 16:57:28 -0500 (EST) Sender: powell@nist.gov Message-ID: <3693DC48.155A662A@nist.gov> Date: Wed, 06 Jan 1999 16:57:28 -0500 From: "Adam C. Powell, IV" Organization: National Institute of Standards and Technology X-Mailer: Mozilla 4.5C-SGI [en] (X11; U; IRIX64 6.5 IP27) X-Accept-Language: en-US, en MIME-Version: 1.0 To: axp-list@redhat.com Subject: Re: Problem with floating point exceptions References: <3693D5C9.786F9302@hamster.lorentzian.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit John Montgomery wrote: > I'm trying to port a large Fortran program to alpha Linux using f2c/gcc. > My system is a UDB running RedHat 5.1. I'm able to compile and run my > code, but I'm having some strange numerical problems. I get floating > point exceptions in sections of the code which evaluate exp(-x) for large > positive values of x. This is normal behavior and on other platforms > results in underflows, which are silently set to zero. Also, when I poke > around in core dumps with gdb I find numbers with exponents less than > -308, which seem like they should have overflowed already. Perhaps these > somehow got unnormalized? > > I'd like to just have these cases underflow to zero without generating > exceptions, does anyone know how to make this happen? I'm not positive, but I think libffm 0.28 gives the behavior you want, and it is several times faster than libm, let alone with -mieee. Just download, build, and link your code -lffm -lm. http://people.frankfurt.netsurf.de/Joachim.Wesner/ Zeen, -Adam `Cold Fusion' Powell, IV http://www.ctcms.nist.gov/~powell/ ____ USDoC, National Institute of Standards & Technology (NIST) |\ ||< | Center for Theoretical and Computational Materials Science | \||_> |