Extended euclidean algorithm mod inverse calculator