Given a mod b and find its inverse, then doing the extended GCD.
ax + by = gcd(a,b)
After I get x and y, how do I get its inverse?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If
gcd(a,b) != 1,adoes not have an inversemod b.Otherwise
ax + by = 1, which means thatax = 1 (mod b), soxis the inverse ofamodb.