bartop

palmoswerks ARCHIVE
Palm OS programming tips from a (former) CodeWarrior insider

header

Navigation

Search
Home
About
Stories
Stuff I Like
Articles
PilRC
CodeWarrior
palmos.techwood.org
DevTools List
Palm OS Dev FAQ

Why Doesn't Floating Point Math Work?


First, if you've read older versions of the Palm OS documentation and its chapters on floating point, you've been reading old information. Palm revised this info extensively for the latest version of the SDK 4.0 documentation; this was released in June as an update on their site.

Second, you should check your 68K Processor preference panel for your targets in CodeWarrior. If you are using CW for Palm OS version 7 or earlier, there is a setting for floating-point. This should be set to "Palm OS". The other settings were for different methods of doing floating point on the Macintosh, and they don't apply to Palm OS devices.

Once you've got this setup, you should be able to use basic math operations, including "+", "-", "/", and "*". If you want to do something more complex, like use trig functions, I suggest you look at MathLib. This free library can be downloaded from Rick Huebner's website at http://www.radiks.net/~rhuebner/mathlib.html. You can either link to the math functions statically or call them via a shared library interface. Handspring's Palm OS devices have MathLib included in their system ROMs, as its used by the enhanced calculator that they ship.

Terrorist Attacks

I've been very saddened over the last few days by the terrorist bombings in New York and Washington, D.C, and my condolences go out to the families and loved ones of the victims of these attacks.

Update: 25 November 2001

CW Palm V8 did away with this "floating point" popup when targeting Palm OS programs. However, if you've converted a project from an older version of CW to V8, your setting might still be wrong. To fix this, go to the 68K Processor preference panel, and hit the "Factory Settings" button. You can then re-fix your settings to match your setup.

brought to you by weblogger.com


Send feedback to combee@techwood.org
Copyright © 2004 Benjamin L. Combee
Palm OS is a registered trademark of PalmSource, Inc.
Metrowerks and CodeWarrior are registered trademarks of Metrowerks Inc.

The views expressed on this website/weblog are those of mine alone and do not necessarily reflect the views of PalmSource or Metrowerks.

This is a Manila Site

qwertYAK / frobnovich