if you're working in ARM you can use my code for this fixed-point math
that i posted in the PACE group

On 6/6/06, Regis St-Gelais <[EMAIL PROTECTED]> wrote:
>"Dmitry Grinberg" <[EMAIL PROTECTED]> a écrit dans le message de news:
>[EMAIL PROTECTED]
>no, sorry but division and multiplication are not so simple. the
>division you gave will result in the integer value 4, not more. to get
>it right you'd need to multiply by the scale factor before the
>division.


Your right.
As I said, I used this technic a long time ago.
I forgot that we need to take care of the scaling in * and /

It should have been
lngResult = 1000 * lngX / lngY;

That's why I said the max usable value must be evaluated before choosing a
data type.

--
Regis St-Gelais
www.laubrass.com



--
For information on using the PalmSource Developer Forums, or to unsubscribe, 
please see http://www.palmos.com/dev/support/forums/



--
Best Regards, Dmitry Grinberg
Software Engineer, http://PalmPowerups.com
(847) 226 9295
AIM: hacker19180
MSN: [EMAIL PROTECTED]
ICQ: 165589894
Y! IM: dmitrygr2003

--
For information on using the PalmSource Developer Forums, or to unsubscribe, 
please see http://www.palmos.com/dev/support/forums/

Reply via email to