"C" compiler should be able to handle division, might have to cast something as "long", etc. But can multiply something by some say multiple of 10's, store as that, and when using in "if" or displaying, just remember the multiplier. Marcel Birthelmer wrote: > On Mon, Aug 10, 2009 at 7:40 PM, Harold > Hallikainen wrote: > >> The math is probably a constant times the reciprocal of the rotation time. >> This is a perfect job for the code generator at >> http://www.piclist.org/techref/piclist/codegen/constdivmul.htm . >> >> Harold >> > > The code generator would only be able to generate x * 1 / constant, > not constant * 1 / x, though, no? > -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist