Extended Euclidean algorithm such that Throws undefined, if both parameters I are equal 0.
Core code registered in leodict.