Aaron, thanks for the tip. I had never really looked at fixed point math before, and was surprised at the simplicity of your example. My application is to read optical encoders mounted on the two axes of an astronomical telescope and convert the encoder readings to the celestial coordinates to which the telescope is pointing. The computational process involves a 3D transformation matrix and the usual trig manipulations of angles, so it could indeed be slow using traditional floating point. I need to worry a little bit about the precision though. I suppose I could use 2 bytes for the fractional part instead of one as you had done, since I don't think the magnitude of my numbers ever gets very large.
Thanks again - Dave Ek -------Original Message------- From: Aaron Ardiri <[EMAIL PROTECTED]> Sent: 03/13/03 12:25 PM To: Palm Developer Forum <[EMAIL PROTECTED]> Subject: Re: floats in syslib shared library under prc-tools 2.2? > > > Thanks for the additional information. I don't know how to solve the > problem, either, but this gets me a little closer. I could only find one > other instance of this problem being reported in pilot.programmer.gcc, and > none in this forum. I'm surprised a few more haven't run into the problem. most people probably wont even use float's :) using floats on palmos has always been slow (software handled), so, it is very common that people seek an integer based solution. have you considered using fixed point math? (integer driven) the Cube3D example on <a target=_blank href="http://www.ardiri.com">www.ardiri.com</a> shows how you work with fixed point mathemetics - and, its faster :) --- Aaron Ardiri [EMAIL PROTECTED] CEO - CTO +46 70 656 1143 Mobile Wizardry <a target=_blank href="http://www.mobilewizardry.com/">http://www.mobilewizardry.com/</a> -- For information on using the Palm Developer Forums, or to unsubscribe, please see <a target=_blank href="http://www.palmos.com/dev/support/forums/">http://www.palmos.com/dev/support/forums/</a> > -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
