home bbs files messages ]

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

   comp.lang.forth      Forth programmers eat a lot of Bratwurst      117,927 messages   

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

   Message 116,987 of 117,927   
   Anton Ertl to dxf   
   Re: FP number syntax   
   01 Jan 25 11:47:16   
   
   From: anton@mips.complang.tuwien.ac.at   
      
   dxf  writes:   
   >On 1/01/2025 2:42 pm, Bernd Linsel wrote:   
   >> It's usually implemented that DPL is reset to -1 when entering >NUMBER,   
   >> each successful digit conversion increments it only if it is >= 0, and the   
   first decimal separator encountered changes it from -1 to 0.   
   >   
   >Yes, in Fig-Forth.  In Swiftforth DPL is just a flag.   
      
   SwiftForth x64-Linux 4.0.0-RC89 15-Jul-2024   
   1 dpl ? -1023  ok   
   1.234 dpl ? 3  ok   
   12 dpl ? -1022  ok   
      
   Apparently SwiftForth counts every digit starting with -1024, and "."   
   setting the count to 0.  So for doubles the behaviour is the same as   
   that of Gforth, and testing for dpl @ 0< identifies singles on both   
   systems.  lxf and VFX behave like Gforth.   
      
   So systems that implement DPL implement it similarly enough that   
   programs can determine the number of digits after the decimal point.   
      
   But does anybody actually make use of DPL?  I have not seen a single   
   use, ever.  Is it just some feature that someone thought up and   
   implemented, and we all continued to implement it because we could and   
   it was traditional?   
      
   If there has been a use at some time, is there still?  I have not seen   
   complaints about the non-standardization of DPL and the   
   only-terminating decimal point in Forth-94 or Forth-2012.   
      
   - anton   
   --   
   M. Anton Ertl  http://www.complang.tuwien.ac.at/anton/home.html   
   comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html   
        New standard: https://forth-standard.org/   
      EuroForth 2024: https://euro.theforth.net   
      
   --- SoupGate-DOS v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

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


(c) 1994,  bbs@darkrealms.ca