Depending on the accuracy you need, and the code space available, lookup tables can be your friend. Do the hard math externally, and just look up the answer. I used LUTs when taking Shannon's entropy for 10 different analog and digital sensors in a security sensor application. MUCH faster than computing it all from scratch. Also, scale your variables. Normally Shannon's entropy is expressed as 0-1 in floating point, but expressing it as 0-255 in integer was plenty good enough for my application, and much faster. Do you NEED to know 1999 vs 20000 rpm? --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .