On Oct 1, 2006, at 4:25 PM, Harold Hallikainen wrote: > Define the diff value function like this... I considered making NEAR use (abs(val-target) < HOWNEAR), which is how I traditionally think of it, and which is similar to your "diff" function, but I didn't have a lot of faith in the efficiency of PIC C compilers/libraries WRT abs() vs the two comparisons. YMMV, check the produced object code, etc... BillW -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist