Once again I need your help please. Suppose you have a a number in the form x^y where x is positive and y is relatively large (more than a hundred). Is there any way you could figure out (approximately) how many digits that number has without having to expand the whole thing first? Is it even possible? Like, for example, if your number is 5^800, can you tell how many digits it has just by looking at it? Please I need to know!
Thanks to all of you!
Feb-16-2004 18:03
Durafei
the crazy russian
Registered: Oct 2000
Location: San Francisco, California
Re: Math Question Again
quote:
Originally posted by creon444
Once again I need your help please. Suppose you have a a number in the form x^y where x is positive and y is relatively large (more than a hundred). Is there any way you could figure out (approximately) how many digits that number has without having to expand the whole thing first? Is it even possible? Like, for example, if your number is 5^800, can you tell how many digits it has just by looking at it? Please I need to know!
Thanks to all of you!
well, here is a very ROUGH estimate...
5 ~= 2^2.. Thus 5^800 = (2^2)^800 = 2^1600.. Now 2^10 = 1024 ~= 1000.
Thus 2^1600 = (2^10)^160 ~= 1000 ^ 160 = 10 ^ 480. Now this has 480 + 1 = 481 digits. Thus a very rough estimate is 481 digits.
Last edited by Durafei on Feb-16-2004 at 23:14
Feb-16-2004 18:16
Noisician
Harsh electronic purity
Registered: Aug 2001
Location:
common logarithm can be extremely useful in such situation.
with 5^800 i suppose u could do something like this
in general, u would need to use some arithmetic to estimate the value of logn first. once u've figured ou t the range, u should be able to get an answer. though it will be approximate in most cases...
___________________
Feb-16-2004 23:07
Durafei
the crazy russian
Registered: Oct 2000
Location: San Francisco, California
quote:
your number has _exactly_ 560 digits.
LOL - my estimate was just "slightly" wrong
For some reason I totally forgot that log(a^b) = b*loga
I can't believe how much worse at Math I became since I went to university 4 years...
BTW, you seem to be pretty sharp in Math. Have you competed at the international level (IMOs and such)?
Feb-16-2004 23:10
Flyboy217
Senior tranceaddict
Registered: Aug 2003
Location: In DEEP SPACE... Space... space... sp...
5^800 = 10^(800 log 5)
~ 10 ^ (800*.69897)
~ 10 ^ (559.17600)
= 10^559 * 10^.176
Which is a 560-digit number (10000....) times a 1-digit number, so you have a 560-digit number.
If you have a calculator handy, this is the easiest way.
Noisician's solution is far more beautiful and intelligent, however
Feb-17-2004 02:01
Flyboy217
Senior tranceaddict
Registered: Aug 2003
Location: In DEEP SPACE... Space... space... sp...
quote:
Originally posted by Durafei
LOL - my estimate was just "slightly" wrong
For some reason I totally forgot that log(a^b) = b*loga
I can't believe how much worse at Math I became since I went to university 4 years...
BTW, you seem to be pretty sharp in Math. Have you competed at the international level (IMOs and such)?
Did you attend Waterloo University (if that's what it's called)? They own in the Putnam. I'd venture to guess Noisician has also had some math competition experience. True?
Feb-17-2004 02:09
AnotherWay83
The B00b Maintenance Guy™
Registered: Aug 2000
Location: land of d(-_-)b
theres actually a really simple formula for calculating the number of digits in a number in any base b, and you can find that formula here:
in general, u would need to use some arithmetic to estimate the value of logn first. once u've figured ou t the range, u should be able to get an answer. though it will be approximate in most cases...
Hehe, I knew you would be posting in this thread . Once again, thanks for your detailed explanation. Appreciate it .
Feb-17-2004 14:11
Harmonic
tranceaddict
Registered: Jan 2004
Location: Jax, FL
Brain hurting... shutdown.
Feb-17-2004 14:14
creon444
Supreme tranceaddict
Registered: Sep 2003
Location: Lorz's moustache
quote:
Originally posted by AnotherWay83
theres actually a really simple formula for calculating the number of digits in a number in any base b, and you can find that formula here:
and that formula gives approx 560 as the number of digits in 5^800.
it seems to me, tho, that noisician worked it out on the fly, so kudos to him for that
So they do have a formula for that! Sweet .
Feb-17-2004 14:17
Durafei
the crazy russian
Registered: Oct 2000
Location: San Francisco, California
quote:
Originally posted by Flyboy217
Did you attend Waterloo University (if that's what it's called)? They own in the Putnam. I'd venture to guess Noisician has also had some math competition experience. True?
I'm at UW now.. We used to own in Putnam - true, but not anymore. All the smart kids have graduated, and now all great students go to US schools.
Feb-17-2004 15:56
Flyboy217
Senior tranceaddict
Registered: Aug 2003
Location: In DEEP SPACE... Space... space... sp...
quote:
Originally posted by AnotherWay83
theres actually a really simple formula for calculating the number of digits in a number in any base b, and you can find that formula here: