PDA

View Full Version : floating point on MPE Forth


wstein
03-24-05, 02:37 PM
Running MPE Forth on the TinyArm

All floating point words and entry of floating
point numbers return the error message

is undefined

Anyone know what's happening here.


Thanks


Bill

RMDumse
03-24-05, 06:52 PM
Hi Bill, Long time! Good to hear from you.

Yes, that seems strange. We see we can use predefined floats, for instance PI F. We see we can use most all the Float functions. But it looks like we can't enter a Float directly.

So we've emailed for support from MPE.

In the mean time, you can try this if you care to. 1234 S>F 100 S>F F/ FCONSTANT <name>

So you can put numbers in as singles. To get decimal points, enter the exponenet separately and divide. Then use assembled Float for your operations.

wstein
03-25-05, 08:38 AM
Hi Randy

How have you been? Good to hear from you too.

Just figured it out this morning. The word

reals


enables floating point routines. I remember FPC
had a similar enabler word.

alpierce
03-25-05, 04:57 PM
Even after using "reals" I can't enter a float unless I use exponent notation.

1.25 yields undefined message

but 1.25e0 is accepted

Also 1.25e0 1.34e0 f+ f. yields 2.59, no exponent notation!

curiouser.