This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: soft-fp: support after-rounding tininess detection


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.

In round-to-nearest mode, a value halfway between the largest subnormal 
and the smallest normal value counts as tiny for after-rounding tininess 
detection (as do values up to but not including three quarters of the way 
from the largest subnormal to the smallest normal), even though the final 
floating-point result is normal.

> And here, does it work to do

Again, no, because that would round to the wrong precision.

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]