"Pete Angiuoli" <[EMAIL PROTECTED]> wrote in message
news:10031@palm-dev-forum...
> I'm using the FlpBase10Info function to return the mantissa, exp and sign
> from an FlpDouble.  The problem arises when the significant digits in the
> number is greater than 8.  The routine chops any significant digits after
> that causing the precision to be lost.  I've looked at the source for it
> and it seems to be coded for that limit.
>
> Before I start messing with the code, has anyone run into this problem and
> found a resolution without having to write their own routines to do it?

The problem is that in order to extract more digits, you need to work with
integers big enough to hold more digits. That means working with 64 bit
integers. The existing routine can be used to extract 8 digits and then
those 8 digits can be converted back into a Double to subtract from the
first to get a remainder. If you're careful, you can use this technique to
get all the digits in a Double, but it's definitely a hack. The right way is
to roll your own routine much like the existing OS routine that uses 64 bit
integer math to extract all the digits.



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palm.com/devzone/mailinglists.html

Reply via email to