[Home]History of Greatest common divisor/Talk

HomePage | Recent Changes | Preferences

Revision 5 . . December 18, 2001 5:02 am by Taw [speed]
Revision 4 . . December 18, 2001 4:38 am by AxelBoldt
Revision 3 . . (edit) December 18, 2001 3:50 am by Taw [fix]
Revision 2 . . December 18, 2001 3:49 am by Taw [what's this gcd algorihm called ?]
Revision 1 . . December 17, 2001 6:56 am by Taw [complexity]
  

Difference (from prior major revision) (no other diffs)

Changed: 5c5
What's this GCD lagorithm called ? --Taw
What's this GCD algorithm called ? --Taw

Changed: 21c21,22
a=(a-b)>>1
a-=b
a>>=1

Changed: 23c24,25
b=(b-a)>>1
b-=a
b>>=1

Changed: 30c32,34
I don't know, but it is cool. Runtime is O(lg(n)); I wonder if it is faster than the ordinary division method? (I changed one line to make it a tiny bit simpler.) --AxelBoldt
I don't know, but it is cool. Runtime is O(lg(n)); I wonder if it is faster than the ordinary division method? (I changed one line to make it a tiny bit simpler.) --AxelBoldt

It's much faster on most hardware because it doesn't use these slow modulo divisions, only ultra-fast shifts and substractions. If we're simplifying, here's an additional simplification. --Taw

HomePage | Recent Changes | Preferences
Search: