Assembler of course. It is nothing to do with floating point. Those routines will give me a lot tho think about. Thansks. __________________________________________ David C Brown 43 Bings Road Whaley Bridge High Peak Phone: 01663 733236 Derbyshire eMail: dcb.home@gmail.com SK23 7ND web: www.bings-knowle.co.uk/dcb *Sent from my etch-a-sketch* On 5 September 2017 at 19:48, Neil wrote: > Is this in C or assembly? > > I still (even though PICs are more powerful nowadays) avoid > floating-point calcs. If I need say 2 decimal points, I multiply by 100 > earlier, then do the division and insert the decimal point as appropriate= .. > > Also, have you seen the routines here?... > http://www.piclist.com/techref/microchip/math/index.htm > > Cheers, > -Neil. > > > > On 9/5/2017 1:33 PM, David C Brown wrote: > > I am trying to find some good 8 and 16 bit division routines for mid > range > > PICs. Most of the app notes I have found give algorithms which result > in > > a quotient and remainder. > > > > However in my case the divisor is always greater than the dividend so I > > want a result that is conceptually between 0 and nearly 1 with an impli= ed > > binary point to the left. > > > > I have written my own routines but I suspect that they are far from > optimum. > > __________________________________________ > > David C Brown > > 43 Bings Road > > Whaley Bridge > > High Peak Phone: 01663 733236 > > Derbyshire eMail: dcb.home@gmail.com > > SK23 7ND web: www.bings-knowle.co.uk/dcb > > > > > > > > > > *Sent from my etch-a-sketch* > > -- > http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .