Jump to content

Talk:Lehmer's GCD algorithm

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by TheBlueWizard (talk | contribs) at 04:54, 11 November 2017 (Add rating). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
WikiProject iconMathematics Start‑class Low‑priority
WikiProject iconThis article is within the scope of WikiProject Mathematics, a collaborative effort to improve the coverage of mathematics on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
StartThis article has been rated as Start-class on Wikipedia's content assessment scale.
LowThis article has been rated as Low-priority on the project's priority scale.

Draft

Hope I've got the algorithm right. Maybe someone could write up a program to test it. We should also make note of the numerous variants on this algorithm eg. Jebelean etc. sometime. Jafet 17:02, 21 December 2006 (UTC)[reply]

This looks like an algorithm well-suited for Matlab or some functional programming language, with multiple assignment and matrices. My question is, how on earth do you tell whether two numbers have the same number of digits in constant time, unless you're keeping track of the number of digits independently somehow (e.g., if this is part of a bignum library)? Without some kind of "similar_size(a,b)" primitive, we're not going to be able to write concise code for this algorithm, are we? --Quuxplusone 03:18, 23 December 2006 (UTC)[reply]
Well, if you're trying to get the GCD of some really large numbers, chances are you are using some sort of bignum library. If not, your numbers are small, and the Euclidean algorithm will do for you; its speed won't be such a big concern with small numbers (and the simplicity of the Euclidean algorithm is welcome). -- Why Not A Duck 02:25, 31 July 2007 (UTC)[reply]