On 22-Feb-02 Rich Mcelroy wrote: > Multiplying A by 100 first would work if it wasn't already a large number. > I have declared it as an unsigned long and it is usually around 4500-6000, > if I multiply by 100 I overflow it. Hmmmm I guess the long must only be 16 bits ? Not quite what K&R intended. Ok, so multiply by 1.0 as that is a float and will cause the result to be a float. ((1.0 * A) / B) * 100.0 That should do the trick I think. Peter -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics