Thomas Ward wrote:
> >>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:
> >
> >This should do the trick for you.
> >
> >Regards,
> >Steve Mann
>
> Russell and Steve,
>
> Thanks for trying to help, but I'm not interested in a specific solution to
> the square root question. I'm looking for GENERAL help on how to use ALL of
> the functions in MathLib (or something like it). For example, I definitely
> need logarithms and power functions. I might need others before I'm done. My
> general question is:
>
> How can I convert an Int32, invoke a MathLib function on it, and convert the
> result back into an Int32?
Have you done straight typecasting? Here is an example:
Int32 i = 230000; // any number
double a = (double) i;
double b = Sqrt(a); // any Mathlib function that takes doubles
Int32 j = (Int32) b;
I have been able to get away with this on regular unsigned longs with no problem at
all.
Steve
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palm.com/devzone/mailinglists.html