Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #41349
| Date | 2015-08-17 07:54 +0100 |
|---|---|
| From | Jan Coombs <Jan-54 <jenfhaomndgfwutc@murmic.plus.com>> |
| Newsgroups | comp.lang.forth |
| Subject | Re: Numeric limits in 8th |
| Message-ID | <20150817075421.487fab8e@HP-6550b> (permalink) |
| References | <mqp3s5$t4r$1@dont-email.me> |
On Sun, 16 Aug 2015 07:35:53 +0300 Ron Aaron <rambamist@gmail.com> wrote: > One of the design decisions for "8th" was that numbers should > "just work". That is, the user should not usually have to be > concerned whether to use an integer or float. > > Similarly, the user should not have to be concerned that an > operation might "overflow". Rather, even calculating the US > external debt in mils should be handled transparently. > > This goal is achieved by promoting numbers from smaller to > larger representations behind the scenes as needed. Thus, the > user need not be concerned that dividing by 3 leaves a > floating-point value -- all such entities are "just numbers", > in general. > > But for efficiency's sake, "big integers" are limited to a > very large but not infinite size. So we added a caveat to our > (upcoming) manual: > > http://8th-dev.com/forum/index.php/topic,483.0.html > > Note that all numbers take up just one 'cell' on the stack. As with Ilya's Forth this provides significant user benefit in usage simplification. For smaller systems it might be good to use a variable length representation of stack items. This would reduce the stack memory size, and required memory bandwidth, also remove the upper limit on data item size. It does require caching for the items near the stack top which need to be accessed or re-ordered, but these may be few. The Python engine only needs access to the top two or three stack items, how many does 8th require? Jan Coombs -- email valid, else fix dots and hyphen jan4clf2014@murrayhyphenmicroftdotcodotuk
Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Numeric limits in 8th Ron Aaron <rambamist@gmail.com> - 2015-08-16 07:35 +0300
Re: Numeric limits in 8th Jan Coombs <Jan-54 <jenfhaomndgfwutc@murmic.plus.com>> - 2015-08-17 07:54 +0100
Re: Numeric limits in 8th Ron Aaron <rambamist@gmail.com> - 2015-08-17 10:41 +0300
Re: Numeric limits in 8th Jan Coombs <Jan-54 <jenfhaomndgfwutc@murmic.plus.com>> - 2015-08-21 22:59 +0100
csiph-web