fixed
2011/9/30 juaninf
> Hi everybody,
>
> I want implement a modified extend Euclidean Algorithm, (egcd
> function), but this give wrong results, below my egcd, please help me
> to fix ...
> def egcd(p1,p2):
>if p2 == PR(0):
>return (p1,1,0)
>else:
>(q1, r1) = (p1).quo_
Hi everybody,
I want implement a modified extend Euclidean Algorithm, (egcd
function), but this give wrong results, below my egcd, please help me
to fix ...
def egcd(p1,p2):
if p2 == PR(0):
return (p1,1,0)
else:
(q1, r1) = (p1).quo_rem(p2)
(d,s1,t1) = egcd(p2, r1)