soft-fp: support after-rounding tininess detection
Richard Henderson
rth@twiddle.net
Wed Feb 12 14:47:00 GMT 2014
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~
More information about the Libc-alpha
mailing list