hi,

i m using igcdex for prime field multiplication inverse calculation. when i
call igcdex
for (2,3)  (which is in my case multiplicative inverse of 2 mod 3) returns
-1, which is not correct
for multiplicaitve inverse calculation. (even though igcdex it self is
correct and returns right values)

This is what I observed,

igcdex calculates  x, y and gcd(a,b)   a*x + b*y = gcd(a,b)

In my case I need the same thing, that is to find  x which is the
multiplicative inverse
of a, given a and b relatively prime (which is obvious in all prime
fields).

But I get minus values for the cases where I m calling igcdex with a,b such
that
b // a  less than or equal to 1.

for example
igcdex(2,3) = -1 , where in my case it should be 2,   2*2 mod 3 =1
igcdex(4,5) = -1, where in my case it should be 4,    4*4 mod 5 =1

will I need some extension for my purpose?

kasun

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to sy...@googlegroups.com.
To unsubscribe from this group, send email to 
sympy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.

Reply via email to