From: Richard Henderson <rth@cygnus.com>
To: axp-list@redhat.com
Subject: Re: Floating point problems
Date: Wed, 2 Dec 1998 16:48:00 -0800 [thread overview]
Message-ID: <19981202164800.G11351@dot.cygnus.com> (raw)
In-Reply-To: <3662D099.2CA026FA@frankfurt.netsurf.de>; from Joachim Wesner on Mon, Nov 30, 1998 at 06:06:33PM +0100
On Mon, Nov 30, 1998 at 06:06:33PM +0100, Joachim Wesner wrote:
> Here the DEC documentation is a bit misleading, it seems I was wrong !
> The fp ops have an additional qualifier /U that determines the underflow
> behavior. HOWEVER, at a first look (what I had done till now,, it seems,
> sorry), you only have two possibilities
>
> - either you do not use /U, then the documentation says any fp op will
> trap with all the above problems when a denormal is a result of the op
>
> - or you use /U, then no trap will happen, but also, the denormal will
> not be replaced by a true zero and the code will trap via 1) the next
> time the result is used in further calculations.
You are misreading. The /u qualifier _enables_ underflow detection
for the instruction. To quote:
If an underflow occurs, a true zero is always stored in the result
register, even if the proper IEEE result would have been -0.
If an underflow occurs and underflow traps are enabled by the
instruction, an underflow arithmetic trap is signaled.
So if you don't use /u, you'll never get underflow traps.
> I have the impression that might be the function routines that are not
> written to NOT return denormals, for example exp of a large negative
> number could return a denormal. This should be changed.
Possibly.
OTOH, I would think only if we can determine that the caller
is not prepared for such a value. I do not know how best to
do this though.
r~
next prev parent reply other threads:[~1998-12-03 0:51 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-11-30 8:16 Floating point problems y0000218
1998-11-30 9:08 ` Carles Perello
1998-11-30 9:53 ` Joachim Wesner
1998-11-30 14:22 ` Alvin Starr
1998-11-30 13:27 ` krebs
1998-11-30 17:06 ` Joachim Wesner
1998-12-03 0:48 ` Richard Henderson [this message]
1998-12-03 16:59 ` Greg Lindahl
1998-12-03 19:35 ` Joachim Wesner
1998-12-03 20:04 ` Richard Henderson
1998-12-03 20:16 ` Greg Lindahl
1998-12-03 23:44 ` Joachim Wesner
1998-12-01 8:42 ` Jochen Kuepper
-- strict thread matches above, loose matches on Subject: below --
1998-11-30 10:24 y0000218
1998-11-30 13:30 ` Alvin Starr
1998-12-03 0:48 ` Richard Henderson
1998-11-28 13:15 Heinz Ulrich Stille
1998-11-28 14:24 ` Johannes G.D. Hausmann
1998-11-28 13:58 ` Heinz Ulrich Stille
1998-11-28 14:48 ` Stefan Schroepfer
1998-11-28 14:57 ` Heinz Ulrich Stille
1998-11-29 13:15 ` Johannes G.D. Hausmann
1998-11-29 13:02 ` Heinz Ulrich Stille
1998-11-29 18:01 ` B. James Phillippe
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