At the very least, this is a good demonstration that a flowchart is NOT sufficient documentation for a "clever" math algorithm. Grr. BillW -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads