|
From: Leon M. <leo...@gm...> - 2010-08-24 22:17:41
|
On Sun, Jul 18, 2010 at 2:17 PM, Matthias Trute <mt...@we...> wrote: >> PS: Any plans for amforth 32bit with float?? > > Not currently. Maybe someone want to volonteer? I've been working on a single precision floating point word set, and I recently got addition/subtraction working. Everything is trivial after that... right? ;) I haven't done a lot of testing, and this is my first real forth project, but you can see its current state at: http://github.com/lnmaurer/amforth-float/blob/master/float.fth It's written in forth and uses the data stack. I haven't made words for turning strings in to floats and vice versa (that's probably the last thing I'll take care of), so -- unless you want to enter numbers by hand (builds character) -- it's limited to working with integers, but that seems to work: > 10 s>f 5 s>f f- f>s . 5 ok > 10 s>f -5 s>f f+ f>s . 5 ok > -10 s>f -5 s>f f+ f>s . -15 ok > -10 s>f -5 s>f f- f>s . -5 ok I may take a break from this for a while, but multiplication/division is next on the todo list. If you have suggestions/questions/patches/whatever feel free to email me. -Leon |