Hi,

My program needs to be able to do some complicated math, such as square
roots, etc. Is Mathlib the only thing available? I went to
http://www.probe.net/~rhuebner/mathlib.html and it hasn't been updated in
over a year. It seems to use the old variable types (e.g., ULong instead of
UInt32). Is there a more recent version?

All I really need to be able to do is something like:

Int32             value1 = 64;
Int32             value2;
SomeFloatType     temp;

temp = Int32ToFloat(value1);
temp = sqrt(temp);
value2 = FloatToInt32(temp);

I don't really care what mechanism is used for these lines of code, just
that it works. I understand that in some cases the above could result in
truncation, it's just an example. But it *IS* Int32 (or UInt32) values that
I need to use.

I see functions in FloatMgr.h like _f_itof() and _f_ftoi(). Can I use them
to create the "double" values that are required by the MathLib functions?

This is the first time I'm using floats, mathlib, etc., so I'd really
appreciate it if someone could send me a snippet of code or tell me:

1. what headers I need to include (and where to get the latest version)
2. exactly how to implement the three lines of code above

Thanks a lot!

Tom

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palm.com/devzone/mailinglists.html

Reply via email to