# In Rabin-Miller exchange why do we stop when we reach a decimal number and use the value of k that outputted an integer

• $$773-1=2^k*m$$
• $$772= 2^k*m$$
• $$772/2^k =m$$

When $$k=1$$:

• $$772/2^1 =386 ,$$

When k=2:

• $$772/2^2 =193$$

When k=3:

• $$772/2^3 =96.5$$

When k=4:

• $$772/2^4 =48.5$$

so in this case we would use $$k =2$$ but why do we stop in decimals.

• Welcome to Cryptography. Rabin-Miller Exchange or Rabin-Miller Probabilistic Primality test? Could you add some source by editing? Dec 25 '21 at 14:48
• Hint: the first step in the Rabin-Miller primality test for $n$ is to express $n$ as $2^k\,m+1$ with odd integer $m$.
– fgrieu
Dec 26 '21 at 9:45