Hi !

I finally understood what to do by carefully looking at FloatMgr.h and 
SampleCalc.c files comments ( always RTFM twice !! :)
( maybe the prc doc or FAQ could be a good place... )

So, it seems that with GCC, we can use the new floatting point manager, but 
not the new functions ( _d_mul and so on ), even with the libnfm.a linked 
with the program.

As english is not my natural language ( but I'm sure you already figured that 
yourself :), it was not clear to me the first time I read all the docs.

Maybe a good thing, to avoid these kind of problems, would be to generate an 
error if we use any of these functions ?

Anyway, as mentionned in SampleCalc comments, I have replaced the calls to 
_d_mul and so on functions with the direct operator ones ( I don't think I 
need FlpBuffer* functions for my problem ).

To be sure what I've done is right ( I'm not familiar at all with FP ), here 
is a code snippet :

FlpCompDouble a, b, c, v;
Int32                 val;
Boolean             result;
(...)

Old version :

v.fd = _d_itod(val);
a.fd = _d_mul( v.fd, b.fd );
result = _d_cmp( a.fd, c.fd ) == flpLess;

New version :

v.d = val; 
a.d = v.d * b.d;
result = ( a.d == c.d );

Do the FP gourous think this is fine ?
Is the 'direct' conversion from Int32 to Double ok, and did the test to 
compare the result do the same thing than _d_cmp with flpLess ?

Thanks.

-- 
Daniel Morais

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to