bug-gforth
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

fdepth (current height of the stack) dont return a value into the float


From: Pascal Dag
Subject: fdepth (current height of the stack) dont return a value into the float stack
Date: Sun, 21 May 2023 11:51:51 +0000 (UTC)

from here (in gforth)

https://github.com/forthy42/gforth/blob/master/float.fs

: fdepth ( -- +n ) \ floating f-depth
    \G @i{+n} is the current number of (floating-point) values on the
    \G floating-point stack.
    fp0 @ fp@ - [ 1 floats ] Literal / ;

: TEST2 ( -- r1 r2 r3 r4 )
    CLEARSTACKS
    0.0e
    0.0e
    2.0e
    FDEPTH
    F.S ;

test2 <3> 0.000000000000E0 0.000000000000E0 2.000000000000E0  ok

I would expect to see  0.0e  0.0e  2.0e  3.0e.


gforth 0.7.3 fromDebian 11.

uname -a
Linux ProDesk 5.10.0-23-amd64 #1 SMP Debian 5.10.179-1 (2023-05-12) x86_64 GNU/Linux

apt list gforth
Listing... Done
gforth/stable,now 0.7.3+dfsg-9+b1 amd64 [installed]
gforth/stable 0.7.3+dfsg-9+b1 i386



Any remark / comment is welcome.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]