Power Problem!

I do not fully understand your problem, what portion of the exp(n *ln(r))
 function are you having trouble with, and why (specifically ) are you
 concerned with its bit manipulation?