The Mixed Binary Euclid Algorithm

Sidi Mohamed Sedjelmaci
<span title="">2009</span> <i title="Elsevier BV"> <a target="_blank" rel="noopener" href="https://fatcat.wiki/container/fhi2xwpnh5gmlgof2idwu5wlgq" style="color: black;">Electronic Notes in Discrete Mathematics</a> </i> &nbsp;
We present a new GCD algorithm for two integers that combines both the Euclidean and the binary gcd approaches. Abstract We present a new GCD algorithm for two integers that combines both the Euclidean and the binary gcd approaches. We give its worst case time analysis and we prove that its bit-time complexity is still O(n 2 ) for two n-bit integers in the worst case. Our experimental implementation shows a clear speedup for small integers. A parallel version matches the best presently known
more &raquo; ... e complexity, namely O(n/ log n) time with O(n 1+ ) processors, for any constant > 0. In this paper, we are interested in small and medium size integers. Usually, the euclidean and the binary GCD algorithms work very well in practice for this range of integers. In Section 2, we present a new algorithm that alternates euclidean and binary reductions, obtaining a faster overall reduction to gcd(u , 0) than would be obtained by using either reduction exclusively. We give its worst case time complexity and a multi-precision version is suggested in Section 3. A parallel version is also suggested in Section 4. It matches the best presently known time complexity, namely O( n log n ) time with n 1+ processors, > 0 (see [3, 16, 15] ). Section 5 describes single, double and multi-precision implementations of the sequential algorithm; timings of these implementations for pseudorandomly generated input pairs of various sizes are also provided, supporting our conclusion that the new algorithm is a good choice for small inputs in many circumstances. 2 3 4 5 6 7 8
<span class="external-identifiers"> <a target="_blank" rel="external noopener noreferrer" href="https://doi.org/10.1016/j.endm.2009.11.029">doi:10.1016/j.endm.2009.11.029</a> <a target="_blank" rel="external noopener" href="https://fatcat.wiki/release/io7eettyt5d37goe3si4xcko6m">fatcat:io7eettyt5d37goe3si4xcko6m</a> </span>
<a target="_blank" rel="noopener" href="https://web.archive.org/web/20170922004759/http://www-lipn.univ-paris13.fr/%7Esedjelmaci/Sed-Web-10.pdf" title="fulltext PDF download" data-goatcounter-click="serp-fulltext" data-goatcounter-title="serp-fulltext"> <button class="ui simple right pointing dropdown compact black labeled icon button serp-button"> <i class="icon ia-icon"></i> Web Archive [PDF] <div class="menu fulltext-thumbnail"> <img src="https://blobs.fatcat.wiki/thumbnail/pdf/84/98/8498a8018918e5fa3e7e75c7f866f24e15ae81c4.180px.jpg" alt="fulltext thumbnail" loading="lazy"> </div> </button> </a> <a target="_blank" rel="external noopener noreferrer" href="https://doi.org/10.1016/j.endm.2009.11.029"> <button class="ui left aligned compact blue labeled icon button serp-button"> <i class="external alternate icon"></i> elsevier.com </button> </a>