[EMAIL PROTECTED] wrote:
> Okay, I cannot seem to figure out how to use the math functions pow,
> sqrt or modf. I get conficting information from the help and compiler
> error messages. When I include math.h, the compiler is issuing a
> warning about mismatched declarations on some functions. If I change
> the project settings to link in mathlib then it complains that the
> "built-in" functions have different parameters. This is crazy!
If you use the built-in functions, beware that they are float only,
not the usual double-precision that you will find most other places,
which corresponds to C's usual behavior of doing floating point
arithmetic in double-precision and supplying a math libary also in
double.
Mathlib is double-precision. Don't try to mix it with the built-in
math library calls. Either include the math library (with the -lm
option to the linker) or use Matlib as per its documentation.
The declarations you use will depend on which math library you use.
Make sure to include the correct header file (#include <math.h> or
#include "Mathlib.h", I think it was).
Jay Ts
--
Every child is an artist. The problem is
how to remain an artist once he grows up.
- Pablo Picasso
--
For information on using the PalmSource Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/