Welcome to NRICH.

 
Number of digits in 21234


By Zhidong Leong on Monday, May 06, 2002 - 02:21 pm:

How many digits are there in the decimal representation of 21234 ?


By Yatir Halevi on Monday, May 06, 2002 - 05:06 pm:

What you actually want to find out is what is x in:
10x=21234
So to find that out you need to solve:
x=[log1021234]+1
x=[1234log102]+1

where [x] is the floor function.


You will get that there are 372 digits in the decimal representation of 21234


Yatir


By Zhidong Leong on Tuesday, May 07, 2002 - 02:52 pm:

Thanks for your reply. Actually, I did that before but I just couldn't figure it out when I did an irritional number after doing lg 21234. How do you explain the irrational number (of digits?)


By Yatir Halevi on Tuesday, May 07, 2002 - 03:16 pm:

What we did doesn't really give us the number of digits, what it gives is 10 to what power will give us this number, for instance lets try the number 123.
log10123=2.09
What this tells us is that 123 lies between 102 to 103 (which is true), and all numbers in this range have a common characteristic, that is they all have 3 digits. For all 3-digit numbers we get as the value of the log: (2+f), where f is the fractional part.
[2+f]+1=2+1=3
(where [x] is the floor function, it truncates the number).

Yatir