[Flashforth-devel] Floating point math in FF
Brought to you by:
oh2aun
From: pito <pi...@vo...> - 2014-07-08 19:37:42
|
Hi! Long time back I had a discussion with Mike on floating point math inclusion into FF. My motivation at that time was because I was helping Leon with his floating point forth words development with amforth, after a lot of work we finally got it working. The floating point written in forth works, but it is slow (in amforth at least), therefore I implemented so called "5primitives" (f+ f- f* f/ fsqrt) in asm. That boosted the stuff such it is perfectly usable. I also created a small forth lib for sin/cos/tan. At that time as we discussed with Mike we had no "for loop", "double integer" and "a recogniser". It seems the community forced the for-loop, not sure we can rocognize a float yet. A possible step by step scenarion is: 1. to get a recogniser working 2. to import Leon's FP words for floating point 3. when everything works we can start to think how to replace the 5primitives with asm code. We can include any fp function when we know the interface from external asm, or a C, though.. (see the 5 primitives source). The floating point libs in amforth (with Leon's fp forth lib and my 5primitives): http://sourceforge.net/p/amforth/community/HEAD/tree/floatingpoint/ P. |