This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: soft-fp: support after-rounding tininess detection
- From: Richard Henderson <rth at twiddle dot net>
- To: "Joseph S. Myers" <joseph at codesourcery dot com>
- Cc: libc-alpha at sourceware dot org, Richard Henderson <rth at redhat dot com>
- Date: Wed, 12 Feb 2014 06:47:46 -0800
- Subject: Re: soft-fp: support after-rounding tininess detection
- Authentication-results: sourceware.org; auth=none
- References: <Pine dot LNX dot 4 dot 64 dot 1402030023100 dot 7179 at digraph dot polyomino dot org dot uk> <52FA97E6 dot 6020000 at twiddle dot net> <Pine dot LNX dot 4 dot 64 dot 1402112217080 dot 11759 at digraph dot polyomino dot org dot uk>
On 02/11/2014 02:28 PM, Joseph S. Myers wrote:
> On Tue, 11 Feb 2014, Richard Henderson wrote:
>
>> Am I missing something, why the SLL is needed for this case?
>> And if it isn't, then the temporary ought not be needed.
>
> After-rounding means after rounding to normal precision, as if the
> exponent range were unbounded - not after rounding to a representable
> floating point value taking account of subnormals having lesser precision.
> For semiraw values N bits below the normal range, just rounding without a
> shift would round to N bits less than the normal precision. (Shifting 1
> bit instead of N is OK because if N > 1 then the result after rounding
> will always still be subnormal, whatever precision it's rounded to, and
> not have the overflow bit set if the shift was only 1 bit.) See IEEE
> 754-2008 subclause 7.5.
Unfortunately I don't have access to the standard to look at that.
But it still makes no sense to me. E.g. rounding up,
X_f = 111...1100
with the shift sees no carry into OVERFLOW, but then the subsequent
"real" rounding does see carry into (OVERFLOW>>1). So now we have
underflow signaled for a result that's not subnormal.
r~