home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.arch      Apparently more than just beeps & boops      131,241 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 130,098 of 131,241   
   Michael S to Terje Mathisen   
   Re: Tonights Tradeoff   
   02 Nov 25 18:14:54   
   
   From: already5chosen@yahoo.com   
      
   On Sun, 2 Nov 2025 16:09:10 +0100   
   Terje Mathisen  wrote:   
      
   > Michael S wrote:   
   > > On Sun, 2 Nov 2025 11:36:36 +0100   
   > > Terje Mathisen  wrote:   
   > >   
   > >> Thomas Koenig wrote:   
   > >>> MitchAlsup  schrieb:   
   > >>>>   
   > >>>> Terje Mathisen  posted:   
   > >>>   
   > >>>>> Actually, for the five required basic operations, you can always   
   > >>>>> do the op in the next higher precision, then round again down to   
   > >>>>> the target, and get exactly the same result.   
   > >>>>   
   > >>>> https://guillaume.melquiond.fr/doc/05-imacs17_1-article.pdf   
   > >>>   
   > >>> The PowerISA version 3.0 introduced rounding to odd for its   
   > >>> 128-bit floating point arithmetic, for that very reason (I   
   > >>> assume).   
   > >>   
   > >> Rounding to odd is basically the same as rounding to sticky, i.e if   
   > >> there are any trailing 1 bits in the exact result, then put that in   
   > >> the ulp position.   
   > >>   
   > >> We have known since before the 1978 ieee754 standard that   
   > >> guard+sticky (plus sign and ulp) is enough to get the rounding   
   > >> correct in all modes.   
   > >>   
   > >> The single exception is when rounding up from the maximum magnitude   
   > >> value to inf should be suppressed, there you do in fact need to   
   > >> check all the bits.   
   > >>   
   > >> Terje   
   > >>   
   > >   
   > > People use names like guard and sticky bits and sometimes also   
   > > rounding bit (e.g. in Wikipedia article) without explanation, as if   
   > > everybody had agreed about what they mean. But I don't think that   
   > > everybody really agree.   
   >   
   > Within the 754 working group the definition is totally clear:   
   >   
      
   I could believe that there is consensus about these names between   
   current members of 754 working group. But nothing of that sort is   
   mentioned in the text of the Standard. Which among other things means   
   that you can not rely on being understood even by new members of 754   
   working group.   
      
   > Guard is the first bit after the normal mantissa.   
   >   
   > Sticky is the bit following the guard bit, it is generated by OR'ing   
   > together all subsequent bits in the exact/infinitely precise result.   
   >   
   > I.e if an exact result is exactly halfway between two representable   
   > numbers, the Guard bit will be set and Sticky unset.   
   >   
   > Ulp (Unit in Last Place)) is the final mantissa bit   
   >   
   > Sign is of course the sign in the Sign-Magnitude format used for all   
   > fp numbers.   
   >   
   > This means that those four bits in combination suffices to separate   
   > between rounding directions:   
   >   
   > Default rounding is nearest or even: (In this case Sign does not   
   > matter.)   
   >   
   > Ulp	| 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 |   
   > Guard	| 0 | 0 | 1 | 1 | 0 | 0 | 1 | 1 |   
   > Sticky	| 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 |   
   >   
   > Round	| 0 | 0 | 0 | 1 | 0 | 0 | 1 | 1 |   
   >   
   > Terje   
   >   
      
   I mostly use ULP/Guard/Sticky in the same meaning. Except when I use   
   them, esp. Guard, differently.   
   Given the choice, [in the context of binary floating point] I'd rather   
   not use the term 'guard' at all. Names like 'rounding bit' or   
   'half-ULP' are far more self-describing.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca