bug-gforth
[Top][All Lists]
Advanced

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

Re: fdepth (current height of the stack) dont return a value into the f


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

Update: the result was in another stack. topic closed.

gforth

Gforth 0.7.3, Copyright (C) 1995-2008 Free Software Foundation, Inc.
Gforth comes with ABSOLUTELY NO WARRANTY; for details type `license'
Type `bye' to exit

1.0e 2.0e 3.0e 4.0e 5.0e 6.0e 5.0e  4.0e  ok

f.s <8> 1.000000000000E0 2.000000000000E0 3.000000000000E0 4.000000000000E0 5.000000000000E0 6.000000000000E0 5.000000000000E0 4.000000000000E0  ok

fdepth  ok                              

.s <1> 8  ok



Am Sonntag, 21. Mai 2023 um 13:51:51 MESZ hat Pascal Dag <pascaldagornet@yahoo.de> Folgendes geschrieben:


from here (in gforth)


: 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]