View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
equiangular equiangular is offline
external usenet poster
 
Posts: 67
Default Extreme calculations

Hi,

You may try this

Function BigMod(base As Long, power As Long, divisor As Long) As Long

Dim i As Long

BigMod = 1
For i = 1 To power
BigMod = (BigMod * (base Mod divisor)) Mod divisor
If BigMod = 0 Then Exit For
Next i

End Function


Diogo wrote:
Need to calculate via Excel:

mod(13^271;162653)

Any thoughts????

Thanks