From: dxforth@gmail.com   
      
   On 10/04/2025 9:35 pm, Hans Bezemer wrote:   
   > On 10-04-2025 07:15, dxf wrote:   
   >> On 9/04/2025 11:14 pm, sjack wrote:   
   >>> Hans Bezemer wrote:   
   >>>> that's helpful. But do you mean "significant digits" the way I mean   
   >>>> "significant digits"? I don't think so.. The beauty of "most significant   
   >>>   
   >>> If you take a measurement and get a four digit number where the last   
   >>> digit was result of rounding, then you have three significant digits.   
   >>>   
   >>> But "words lie"; just their nature.   
   >>   
   >> But when Forth-94 instructs you to 'round the number to n significant   
   digits'   
   >> what is unclear? Not the numerical result.   
   >>   
   >> What's ambiguous in Forth-94 is the returned representation i.e. should   
   >> REPRESENT return '0's representing the insignificant digits; should F.   
   >> trim the redundant trailing '0's.   
   >   
   > Just my gut feeling: REPRESENT - no. This is a word used to construct number   
   representations. It should be as literal as possible, because the programmer   
   will most probably interfere in the representation. If he wants those zeros he   
   should get them    
   rather than add them IMHO.   
      
   Gut feeling or no, interpreting the spec such that the user may only access u   
   characters from the buffer results in poor outcomes. We knew this by 2004.   
   Later a revised spec for REPRESENT was offered that resolved all known issues   
   and ambiguities.   
      
   > F. - yes. This is my most vanilla floating point printer. It's the "just   
   gimme my number" word - no frills.   
      
   IOW you chose an interpretation that you knew was good for you. Exactly my   
   approach.   
      
   --- SoupGate-DOS v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|