Comparing large prime powers.

I have two very large primes (a, b) , each raised to a large (non-prime) integer powers (p,q) .

I want to evaluate the comparison:

a^p >= b^q

However, I don't want to attempt to calculate a^p, b^q since the results will be astronomically huge, and I only need to know which is the largest.

Obviously if a>b and p>q then the answer is trivial, however in the general case I'm stumped...

Any suggestions ?

Thanks, I'm definately going to look into it at the weekend

Thanks for the reply, I'm definately going to look into the log approach at the weekend when I've got some time to sit down and look at it analytically.

I'm thinking that I may be able to evaluate either side as a series, taking the difference of the series and see if it converges to a positive or negative to indicate which side of the inequality is greater.

Thanks for pointing me in this direction. I'll post again here when I've got a bit further in a few days time. I'm a programmer, not a mathematician, so there's a good chance that I'll miss the obvious solution if I don't know the maths!

Cheers.