Accuracy and the power function

02212014, 07:11 AM
Post: #13




RE: Accuracy and the power function
Hi Dieter,
no it doesn't. That's where the Sticky Bit comes in: the CPU works with 15 digits only, aligning the mantissa's (in case of addition), or repeatedly addandshift in case of multiplication. In both cases it will keep track of the digits lost to the right, just to know whether they're all zero or not. That's why it's called a 'Sticky Bit': once you shifted a nonzero digit to the right, it is set, and remains set. So, in your example: 5.02000000124e15 + 5009 (exact result: 5.020000001245009e15) would be truncated to 5.02000000124500, BUT the Sticky Bit would be set, as the '9' we lost is nonzero. And the routine that rounds 15 digits to 12 will round a trailing '500' up when it is set, and round to even when it is clear. That's why all 12digit HPs do get the correctly rounded answer for this example (or any other), yet they all truncate their 15digit result. Werner 41CVâ€ ,42S,48GX,49G,DM42,DM41X,17BII,15CE,DM15L 

« Next Oldest  Next Newest »

User(s) browsing this thread: 1 Guest(s)