🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.lang.forth
4 messages
4 total messages Started by Hans Bezemer Wed, 07 Oct 2026 08:11
Re: You cannot know how many cells a floating-point number takes?
#12
Author: Hans Bezemer
Date: Wed, 07 Oct 2026 08:11
42 lines
2905 bytes
On 06-10-2026 22:13, Paul Rubin wrote:
> Hans Bezemer <the.beez.speaks@gmail.com> writes:
>> 1 floats 1 cells /mod . . 1 0  ok
>> So it told me -- without ANY doubt whatsoever, that the size of a
>> FLOAT is equal to the size of a CELL.
> 
> That's on your specific installation, which might be 64-bit gforth.  You
> could also try it with 32-bit gforth, which might still use 64-bit
> floats.

> In Forth-2012 I think the FP stack is mandated.

Note this is what we're talking about:

I bumped into this Gforth manual page:

"5.6.2 Floating point stack

Whilst every sane Forth has a separate floating-point stack, it is not 
strictly required; an ANS Forth system could theoretically keep 
floating-point numbers on the data stack."

And here it comes: "As an additional difficulty, you don't know how many 
cells a floating-point number takes."

Given Forth-2012, true, the FP stack is mandated. Which makes this 
paragraph moot to begin with:

"12.3.3 Floating-point stack -- The floating-point stack shall be 
separate from the data and return stacks."

But okay -- not everybody takes updating their manual that serious.

And I never said that there should be fixed values attached to 
CELLS/FLOAT. I just claimed that the statement "As an additional 
difficulty, you don't know how many cells a floating-point number takes" 
is simply untrue. Whether the size of the FVARIABLE or the size of an FP 
item on a shared stack -- it can be known. You don't even have to 
manually maintain it, you can have the compiler figure it out at runtime.

Hans Bezemer
Re: You cannot know how many cells a floating-point number takes?
#14
Author: Anton Ertl
Date: Wed, 07 Oct 2026 08:26
26 lines
2165 bytes
Hans Bezemer <the.beez.speaks@gmail.com> writes:
>I bumped into this Gforth manual page:
>
>"5.6.2 Floating point stack

The manual of Gforth 0.7, which appeared in 2008, has such a section.

>Given Forth-2012, true, the FP stack is mandated. Which makes this 
>paragraph moot to begin with

>But okay -- not everybody takes updating their manual that serious.

If you want to look at the updated manual, here's the relevant section:

https://net2o.de/gforth/Stack-Manipulation.html

This says everything about how the stacks relate to each other, and if
you want to look at the section formerly known as "5.6.2 Floating
point stack", you click on the link to "Floating point stack".

- 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 2026 CFP: http://www.euroforth.org/ef26/cfp.html
Re: You cannot know how many cells a floating-point number takes?
#15
Author: Hans Bezemer
Date: Wed, 07 Oct 2026 09:41
36 lines
2759 bytes
On 07-10-2026 10:26, Anton Ertl wrote:
> Hans Bezemer <the.beez.speaks@gmail.com> writes:
>> I bumped into this Gforth manual page:
>>
>> "5.6.2 Floating point stack
> 
> The manual of Gforth 0.7, which appeared in 2008, has such a section.
> 
>> Given Forth-2012, true, the FP stack is mandated. Which makes this
>> paragraph moot to begin with
> 
>> But okay -- not everybody takes updating their manual that serious.
> 
> If you want to look at the updated manual, here's the relevant section:
> 
> https://net2o.de/gforth/Stack-Manipulation.html
> 
> This says everything about how the stacks relate to each other, and if
> you want to look at the section formerly known as "5.6.2 Floating
> point stack", you click on the link to "Floating point stack".
> 
> - anton

Well, how many "official" Gforth manuals are there?!

https://www.complang.tuwien.ac.at/forth/gforth/Docs-html/Floating-point-stack.html
https://gforth.org/manual/Floating-point-stack.html
https://forth-ev.de/wiki/res/lib/exe/fetch.php/projects:gforth-android:gforth-ebook.pdf
https://www.scribd.com/document/395446065/gforth-2018-11-23

Obvious, you might argue that the last two are obviously third parties 
who offer the manual, but does 
'https://net2o.de/gforth/Stack-Manipulation.html' automatically strike 
you as "the" official site?

Hans Bezemer
Gforth manual (was: You cannot know how many cells a floating-point number takes?)
#17
Author: Anton Ertl
Date: Wed, 07 Oct 2026 10:21
33 lines
2849 bytes
Hans Bezemer <the.beez.speaks@gmail.com> writes:
>Well, how many "official" Gforth manuals are there?!

The ones that are delivered with the various releases and snapshots
are official (although, for the snapshots, the manual sometimes is not
up-to-date wrt. the implementation; but for the current snapshot, they
are).

What I have seen on the web are the HTML versions of manuals for
various releases or snapshots.  If you are on one page of a HTML
version, click on the [Contents] link at the top of the page, or, if
that does not exist, repeatedly on the "Up:" link, and then scroll up,
or down and it will tell you for which version of Gforth this manual
is, in a sentence starting with "This manual is for Gforth (version".

I have not yet seen any fake manuals for Gforth, so, for now, you
probably do not have to worry about whether a web version is official,
just about which version of Gforth it documents.

>https://gforth.org/manual/Floating-point-stack.html

Note that the "Manual" link at gforth.org links to
<https://net2o.de/gforth/>.  <https://gforth.org/manual/> currently is
for version 0.7.9_20180815; Gerald does not keep the manual up-to-dat,
that's why the link points to net2o.de, where the manual is pretty
up-to-date to the latest snapshot.

- 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 2026 CFP: http://www.euroforth.org/ef26/cfp.html
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads