Sujet : Re: Parsing timestamps?
De : dxforth (at) *nospam* gmail.com (dxf)
Groupes : comp.lang.forthDate : 08. Jul 2025, 04:17:28
Autres entêtes
Organisation : i2pn2 (i2pn.org)
Message-ID : <6fb36a9ccd2b7852d231bc40b6985842af1cb985@i2pn2.org>
References : 1 2 3 4 5 6 7 8 9 10 11
User-Agent : Mozilla Thunderbird
On 7/07/2025 9:21 pm, Hans Bezemer wrote:
On 07-07-2025 05:48, dxf wrote:
...
He appears to dislike the idea of standard-imposed minimums (e.g. Carter's
suggestion of 16) but suggested:
>
a) the user can offload to memory if necessary from
fpu hardware;
>
b) an ANS FLOATING and FLOATING EXT wordset includes
the necessary hooks to extend the fp stack.
In 4tH, there are two (highlevel) FP-systems - with 6 predetermined configurations. Configs number 0-2 don't have an FP stack, they use the datastack. 3-5 have a separate FP stack - and double the precision. The standard FP stacksize is 16, you can extend it by defining a constant before including the FP libs.
Given the ANS minimum of 6 and recognizing that merely displaying an fp number can
consume several positions I added another 5 as headroom. I organized it such that
if the interpreter or ?STACK was invoked, anything more than 6 would report the
overflow:
DX-Forth 4.60 2025-06-25
Software floating-point (separate stack)
1e 2e 3e 4e 5e 6e .s 1. 2. 3. 4. 5. 6.000001 <f ok
7e 7e f-stack?
Whether it was worth it is hard to say. OTOH users are free to patch those limits
to anything they like and do a COLD or SAVE-SYSTEM to enact the change.