Talk:Lehmer's GCD algorithm: Difference between revisions

Content deleted Content added
Snowbot (talk | contribs)
m WikiProject tagging on behalf of User:Parker007 for Wikipedia:WikiProject_Mathematics - ask any info here
Cewbot (talk | contribs)
m Maintain {{WPBS}}: 1 WikiProject template. Remove 1 deprecated parameter: field.
 
(4 intermediate revisions by 4 users not shown)
Line 1:
{{MathsWikiProject ratingbanner shell|class=StubStart|importance=}}
{{WikiProject Mathematics| importance = low}}
}}
 
== Draft ==
Line 5 ⟶ 7:
 
: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 "<code>similar_size(a,b)</code>" primitive, we're not going to be able to write concise code for this algorithm, are we? --[[User:Quuxplusone|Quuxplusone]] 03:18, 23 December 2006 (UTC)
 
::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). -- [[User:Why Not A Duck|Why Not A Duck]] 02:25, 31 July 2007 (UTC)