How do you calculate n^m for large n and m?

#1
Hi!
I'm quite new to R (and this forum..), today I tried to calculate n^m for some large n and m. The results were too large. For example, 20^300=inf.

How do you calculate it? Is there a function for approximation of n^m of large n or m?

Thank you:D
 

Dason

Ambassador to the humans
#4
Can I ask why you're trying to do this? If this is just a step in a larger calculation you could probability optimize the calculation.