> So, you want an approximation formula. I think that the best > way is using a spreadsheet (i.e., excel). Just build a table, > input values (the values of "a") and output values in two > columns, like: > > A B > 1 1234 > 2 5678 > 3 ... > > The values should be already scaled. Then, you plot your table > as an X/Y plot and fit a polynomial function to the data. In > excel, this is really easy (add tendency line, select > "polynomial", and "show formula". Well, yes, that would get me a formula, but would the formula evaluate correctly in integer only math? In this case, the real trick was figuring out how to scale the values correctly so that they didn't become fractional. Speff somehow figured that out for me, but I admit, I still don't really understand how he did it... --- James. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist