Groups | Search | Server Info | Login | Register
Groups > comp.arch.arithmetic > #76
| Newsgroups | comp.arch.arithmetic |
|---|---|
| Date | 2014-10-11 00:19 -0700 |
| Message-ID | <74d951ee-6fd2-43ad-8f0a-2852a031bd2c@googlegroups.com> (permalink) |
| Subject | New appromixation for integer division by 63 or 127 |
| From | nikolaos.kavvadias@gmail.com |
Dear all, I believe I have invented a new approximation for quotient calculation that works for x/63 and x/127. The formula is as follows and it is divisionless and multiplierless: y = (((x>>n)+x+((1<<n)+1))>>n)-1; Use n=6 for 63, and n=7 for 127. 1<<n is the strength-reduced form for calculating 2^n. My formula does not require any double-word arithmetic (like with multiplying by multiplicative inverse and then performing adjustment steps). It does not seem to work for other dividers, but a systematic fix may be possible. Are there any known references on this? Best regards Nikolaos Kavvadias http://www.nkavvadias.com http://github.com/nkkav/
Back to comp.arch.arithmetic | Previous | Next — Next in thread | Find similar
New appromixation for integer division by 63 or 127 nikolaos.kavvadias@gmail.com - 2014-10-11 00:19 -0700
Re: New appromixation for integer division by 63 or 127 nikolaos.kavvadias@gmail.com - 2014-10-11 06:05 -0700
Re: New appromixation for integer division by 63 or 127 Terje Mathisen <terje.mathisen@tmsw.no> - 2014-10-13 10:20 +0200
Re: New appromixation for integer division by 63 or 127 nikolaos.kavvadias@gmail.com - 2014-10-15 01:09 -0700
csiph-web