From: <[EMAIL PROTECTED]>
Subject: How do I convert a string to a number floating
> How do I convert a string like "7.41" into a number floating like 7.41
> instead 7.409999
The problem you are encountering is due to the fact that you can't represent
most decimal numbers accurately with a finite number of binary digits. The
way you solve this problem is determined by what you are using the floating
point number for. In most cases, you don't need to use floating point
numbers at all. If, for example, you are representing dollars and cents,
use an integer data type to hold the number of cents (e.g., $7.41 == 741
cents) and insert the decimal point when you display the number.
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/