extended_euclid(a, b)

d =
0
x =
1
y =
0
a: b:

calculation took 3.1e-05 seconds. (Perl v5.8.8, BigInt library Math::BigInt::GMP, Processor Athlon 64 3500+)