Skip to content
Back to formatted view

Raw Message

Message-ID: <58498.137.222.81.19.1259340725.squirrel@webmail.bris.ac.uk>
Date: 2009-11-27T16:52:05Z
From: SJ Robson-Davis
Subject: Modular inverses

I want to find the inverse of an integer k mod p (prime.) Is there a
function that can do this for me? I know i could simply write (k^(p-2)) %%
p, but i need to do this for large primes (above 100) and this gives the
warning message:
Warning message:
probable complete loss of accuracy in modulus
so this method does not work. Any ideas?

Thanks,

Samuel

--