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. Yup. I tend to do such calculations -- at least when trying to figure out the ranges -- using the C = operators (e.g. += or *= -- rather than normal + or * or even composite formulas on several variables), noting on each line what's the input range(s) and the result range. That helps you make sure that there are no surprises in ranges that you want to cover. Gerhard -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist