Archive:
Code:
Any reciprocal 1/n where n  1 = 2^m (and m is an integer)can be represented as a geometric series starting with 1/(n1) and having a ratio of 1/(n1). This is convenient because division by n is just a matter of shifting. To expand on that point, dividing by another number, q, when q's factors are made up of the sequence described earlier (3, 5, 9, 17, 33...) and the sequence 2^m (2, 4, 8, 16, 32...) is a breeze.+
Questions:
I recently adapted the 32 bit division routine from a 1979 edition of 8080 FIGForth to run on a 16F876. As this uses only 16 loops it is inherently faster than Peter Hemsley's 32loop version above. Would this be worth adding to your library and if so, how?
Tom
James Newton of MassMind replies: Sure. Just post it here, but be sure to select "preformate text" from the options list.+
See also:
file: /Techref/microchip/math/div/index.htm, 9KB, , updated: 2018/3/14 01:54, local time: 2018/9/21 02:06,

©2018 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://techref.massmind.org/techref/microchip/math/div/index.htm"> PIC Microcontroller Basic Math Division Methods</A> 
Did you find what you needed? 
Welcome to massmind.org! 
Welcome to techref.massmind.org! 
.