>I need to divide a number 0 - 65535 by a constant 182.024. >If I divide by 182 this would give an error of around 0.013%, >which might be OK, I just don't know yet. I cannot believe people still don't know about this work of art: http://www.piclist.com/techref/piclist/codegen/constdivmul.htm Nikolai should make money off of this. But he's a nice guy so he lets us use it for free :) --Andrew ps: Here's a hint on how accurate you can make it: ; Approximated constant: 0.00549376, Error: 0.000362065 % ; Input: ACC0 .. ACC1, 16 bits ; Output: ACC0 .. ACC1, 9 bits ; Code size: 56 instructions _________________________________________________________________ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body