Extended Euclidean algorithm
Merge pull request #37 from quietshu/master

Extended Euclidean algorithm