gforth
[Top][All Lists]
Advanced

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

Re: [gforth] Floating-point stack underflow


From: Charles Montgomery
Subject: Re: [gforth] Floating-point stack underflow
Date: Sat, 6 Mar 2010 10:18:09 -0500

On Mar 6, 2010, at 9:38 AM, Terrence Brannon wrote:

I tried to put 2 floating point numbers on the stack and was not even
able to do that, let alone add them.
...
5.5
5.5  ok

This puts the double number 55 0 on the data stack.
To put 5.5 on the floating point stack, use 5.5e or 55e-1 or similar.
f+ adds two numbers on the floating point stack with the result left on the floating point stack.
f. prints the value on the floating point stack.

5.5e  ok
2.2e  ok
f+ f. 7.7  ok

Hope this helps.   cgm




reply via email to

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