Friday, January 20, 2012

Euclid's Algorithm

Today I coded up Euclid's Algorithm for finding the gcd. Euclid's algorithm also returns a linear combination of the two given numbers such that the sum is 1.

I haven't yet found an example for why that linear combination can come in useful, though there are many that require finding the gcd.

No comments:

Post a Comment