This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: expand and truncate and 387
- To: moshier at mediaone dot net, Richard Henderson <rth at cygnus dot com>
- Subject: Re: expand and truncate and 387
- From: Richard Henderson <rth at cygnus dot com>
- Date: Fri, 27 Nov 1998 08:51:25 -0800
- Cc: law at cygnus dot com, Jan Hubicka <hubicka at atrey dot karlin dot mff dot cuni dot cz>, egcs at cygnus dot com, Marc Lehmann <pcg at goof dot com>
- References: <19981126003855.A13044@dot.cygnus.com> <Pine.LNX.4.05.9811260929050.6450-100000@moshier.ne.mediaone.net>
- Reply-To: Richard Henderson <rth at cygnus dot com>
On Thu, Nov 26, 1998 at 09:51:40AM -0500, Stephen L Moshier wrote:
> > I believe extensions to be a no-op.
>
> IEEE does not agree. The reason is that a format conversion is an
> "operation" which among other things means that the "exception" flags
> can change as a result. Suppose you have a value in single precision
> that is marked with the "inexact" flag. After extending to double it
> is no longer inexact, because IEEE 754 para 5.3 says "Conversion to a
> wider precision is exact." So to make IEEE happy your no-op would
> have to clear the inexact flag.
What? The accrued exception bits are just that -- accrued.
Only the user clears them. Ever.
Moreover, that "inexact" flag means that some _calculation_
was inexact. It says _nothing_ about whether the resulting
value is denormal or whatnot.
r~