Sara Revell <[EMAIL PROTECTED]> wrote:
> I have an equation, and I need to multiply an Int16 by a float, with the
> answer also being a float. However, the answer seems to come out to zero.
> My only guess is that it doesn't like multiplying the Int and the float.
Good guess. Strangely, noone has yet mentioned the most likely reason
for your problem: for a while, prc-tools had a bug that would make
int<->float conversions always return 0.0 or occasionally loop forever.
> I'm using PRC-Tools for development, if that may affect it all.
You don't say what version of prc-tools you are using. The bug is in
prc-tools 2.0. If this is the version you are using, there are two
solutions:
* There is a patch to prc-tools 2.0 which fixes these floating point
problems. It used to be available from
http://www.palmos.com/dev/tech/tools/gcc/, but the relevant part of
the page seems to have been recently rewritten and broken. You may
be able to get what you need from
http://homepages.enterprise.net/jmarshall/palmos/float.html, but it's
probably more sensible to:
* Upgrade to a more recent version at http://prc-tools.sourceforge.net/
which fixes several 2.0 bugs including this one.
John "wish I still lived in Edinburgh :-)"
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/