On Tue, 14 Oct 2003 15:15:22, Brian Smith wrote: >Found out what it is, and it's not what I first thought it to be. Seems >that a type cast from double to Int32 is what's causing the problem >(adding about 3k of code and apparently a global or two). What I don't >know is how to get around it. Ideas?
If the numbers are in a reasonable range (approx 1 <= x < 2^31, etc.), and you don't care about rounding accuracy, it's not hard to extract the exponent and mantissa bits from an fp double and do a shift, and with much less than 3k of compiled code plus globals. There are a large number of web pages which document the IEEE binary floating point format. Here's a random one from google: http://pheatt.emporia.edu/courses/cs220f03/hand16a/hand16a.htm Ron Nicholson HotPaw Productions <http://www.hotpaw.com/rhn/palm> -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
