Palm Programming wrote:
> I cry uncle! OK, I realize this is a trivial thing, but every other OS i've ever
>programmed for has
> had utilities to handle this.
I guess you haven't worked in form factors this small before eh?
>
> I have a float, say it's 60.05
>
> If I use the built-in "NewFloatManager" calls to convert it to a string I get
>
> "6.0050001e01" instead of 60.05
At least you are getting this and not having to parse the bit field of the double
yourself like one project I did for a an 8-bit
microcontroller a few years back.
>
> I'd like my users to see "60.05", it's not asking that much is it?
That is not much for your users but way too much for Palm. Floating point management
routines can eat up CPU and memory like you
wouldn't believe. This is why all of the early PC's had separate math coprocessors
with each development environment shipping
separate libraries for different floating point types.
>
> First, I'm amazed their isn't a standard library for handling this in the Palm.
Get out of the PC / desktop mindset. You are no longer in Kansas anymore.
I'll quote it again, "The only thing worse than a user expecting a Palm to act like a
Pentium PC is a Palm developer expecting the
compatibility of a Sun Workstation."
And another quote, "It's only a 16 MHz, 68K machine!"
>
> 2nd, I'm sure some bright programmer who is infinitely more talented than I already
>has a set of
> routines to deal with this?
There is plenty of freeware routines out there for this. Happy hunting!
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palm.com/devzone/mailinglists.html