Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Joachim Wesner <Joachim.Wesner@frankfurt.netsurf.de>
To: axp-list@redhat.com
Subject: Re: Problem with floating point exceptions
Date: Thu, 7 Jan 1999 02:06:05 +0100	[thread overview]
Message-ID: <99010702103700.01905@Othello> (raw)
In-Reply-To: 3693DC48.155A662A@nist.gov

On Wed, 06 Jan 1999, Adam C. Powell, IV wrote:
>John Montgomery wrote:
>
>> II 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. 
>>
>> 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.
>

Yes, libffm now works that way that it (should) never return denormalized
numbers as the result of calculation, HOWEVER, in the current implementation,
for the functions that are "identity" for very small args x, where sin(x) =
tan(x) = asin(x) = atan(x), also the same denormalized number is returned 
that enters the routine.

Probably, in the next release I will add a compile time option to "fix" these
arguments by returning zero here instead, so libffm will do some "healing
action" on bad args.

Nevertheless, for exp, already in the current version, NO denorms are
returned for too negative args, 0 is returned instead.

Joachim Wesner


  reply	other threads:[~1999-01-07  1:27 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-01-06 21:29 Problem with floating point exceptions John Montgomery
1999-01-06 21:47 ` Greg Lindahl
1999-01-06 23:23   ` Michal Jaegermann
1999-01-07 10:19     ` John Connett
1999-01-06 21:57 ` Adam C. Powell, IV
1999-01-07  1:06   ` Joachim Wesner [this message]
1999-01-07 15:54   ` Samba Izaak Bozof
1999-01-07 16:53     ` Samba feedback
1999-01-07 16:56     ` Samba Michal Jaegermann
1999-01-07 17:57     ` Samba Maurice Hilarius
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