Or mult by 18, then divide by 256. Will not be any more accurate than *9/128, but Divide by 256 is simply dropping the least sig byte. now I gotta buy a new calculator that has "dilberts" :-) -- Mark > -----Original Message----- > From: piclist-bounces@mit.edu [mailto:piclist-bounces@mit.edu]On Behalf > Of David VanHorn > Sent: Thursday, May 08, 2008 12:06 PM > To: Microcontroller discussion list - Public. > Subject: Re: [PIC] - Need fast divide by 14 constant routine? ( Random > access8-bit data in PIC16F flash ) > > > Multiply by 9, then divide by 128? (close..) > > It's not really apparent what you're trying to optimize. > I had a problem once where I was trying to do bearing calculations, > and I did NOT want to do 16 bit math, and I was able to do it in 8 > bit, forsaking degrees for "dilberts" where there are 256 dilberts of > angle in a circle > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > > -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist