Skip to Main content Skip to Navigation

A Binary Recursive Gcd Algorithm

Damien Stehlé 1 Paul Zimmermann 1
1 SPACES - Solving problems through algebraic computation and efficient software
INRIA Lorraine, LORIA - Laboratoire Lorrain de Recherche en Informatique et ses Applications
Abstract : The binary algorithm is a variant of the Euclidean algorithm that performs well in practice. We present a quasi-linear time recursive algorithm that computes the greatest common divisor of two integers by simulating a slightly modified version of the binary algorithm. The structure of the recursive algorithm is very close to the one of the well-known Knuth-Schönhage fast gcd algorithm, but the description and the proof of correctness are significantly simpler in our case. This leads to a simplification of the implementation and to better running times.
Document type :
Complete list of metadata
Contributor : Rapport de Recherche Inria <>
Submitted on : Tuesday, May 23, 2006 - 5:52:49 PM
Last modification on : Friday, February 26, 2021 - 3:28:07 PM
Long-term archiving on: : Sunday, April 4, 2010 - 10:23:11 PM


  • HAL Id : inria-00071533, version 1



Damien Stehlé, Paul Zimmermann. A Binary Recursive Gcd Algorithm. [Research Report] RR-5050, INRIA. 2002. ⟨inria-00071533⟩



Record views


Files downloads