On Fri, 22 Feb 2002, Rich Mcelroy wrote: > A is a signed long, and B is an unsigned long. two large values. That's probably the problem. Dunno about Bytecraft, but the compiler probably isn't quite intiutive enough to know that you want to perform an operation with two longs and get a float result. It's probably going to do a long mult, then try to map the result into a float variable... the results aren't going to be pretty, I've found. Try this: float Percent; signed long A; unsigned long B; Percent = (float)A/(float)B; Percent *= 100; You may want to take a look at the resulting code size. I find my compiler often generates much smaller, cleaner code with something like this: float Percent, fA, fB; signed long A; unsigned long B; fA = (float)A; fB = (float)B; Percent = fA/fB; Percent *= 100; Dale -- "Curiosity is the very basis of education and if you tell me that curiosity killed the cat, I say only the cat died nobly." - Arnold Edinborough -- 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