Definition:
x=logb(a)⇔bx=a(fora,b>0andb<>1)
Formula to convert logarithm base g to base b:
logb(x)=logb(g)∗logg(x)
------------------------------------
4^300 = number "a" is a really large number, but we don't care what the actual number is, instead we want to know how many digits the number has:
4^300 = a
300 = log4( a )
and:
log10( a) = log10( 4 ) * log4( a ) = log10( 4 ) * 300
log10( a) = log10( 4 ) * 300
log10( a ) = 180.61799739838872 ( so about 180 digits)
------------------------------------
3^400 = b
400 = log3( b )
and:
log10( b) = log10( 3 ) * log3( b ) = log10( 3 ) * 400
log10( b) = log10( 3 ) * 400
log10( b ) = 190.848501887864976 ( so about 190 digits)