Sean Breheny wrote: > Just beware that you need a data type which is large enough to store > x^2 to do this. You might be better doing c*x first and then > multiplying by x again. That minimizes the range of values which your > variables need to store. > > Sean > > Yes. Luckily, my x is a 16 bit unsigned integer, so x^2 always fits in a 32 bit space. I hadn't considered the benefits of working out c*x*x in that sequence however. Matt -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist