Using Logarithms to Find Number of Digits in Large NumbersDate: 06/25/2007 at 23:01:05 From: Y Subject: antilogarithms How do you convert the base of an antilogarithm? I'm asking this question because I am stuck on a question from a chapter called Logarithmic Function Values and Antilogarithms in an Algebra 2 textbook. The question is: a. How many digits are there in 8^1000? b. What power of 8 has 1000 digits? c. What number to the 1000th power has 500 digits? The answer to the questions a, b, and c are 904, 8^1107, and +/-sqrt(10) respectively. I had an idea of using log_8 (x) = 1000 = log (x) / log (8). But when I tried to solve for x by using a calculator, the answer is so big that the result couldn't be shown. So, this method doesn't work. How do you solve it, then? Thanks for your help in advance. Date: 06/26/2007 at 03:40:00 From: Doctor Ricky Subject: Re: antilogarithms Hi Y, Thanks for writing Dr. Math! Actually, you were on to the right idea with your thought of expressing it as logarithms, but there's one thing we need to realize. Our idea of digits in our decimal system (remember, "deci" means ten) is based on powers of 10. This means that the numbers 0, 1, 2, ... , 8, 9 are all one-digit numbers, but when we get to 10, we get to a two-digit number. The first time we see a three-digit number is when we get to 100, which is 10^2. Using this idea, that means that we could solve question (a) by saying that if we have x digits in 8^1000, that means that 10^(x-1) = 8^1000 [we put 10 to the (x-1) power because 10^1 has] [2 digits, 10^2 has 3 digits, so 10^(x-1) has ] [x digits ] To solve for x, we need to take the logarithm of both sides with a base of 10 (which is the base of the common log, which means we don't need to write the base in the log), so we get: x - 1 = log [8^1000] = 1000 * log [8] = 903.09 Adding 1, we get: x = 904.09 We round this down to 904 because remember we are talking about digits and a number can't have part of a digit. That means that ANYTIME we do this, we ALWAYS round down. Even if it's 904.9999, we would still round down. Therefore, 8^1000 has 904 digits. This same method should allow you to solve (b) without much trouble. Now let's look at (c) to make sure we have a strong grasp on this idea. We are asked "what number to the 1000th power has 500 digits?" We still use our same formula from part (a) to answer this question. So now we are saying that our number will have 500 digits and we are putting the number to the 1000th power, so our equation looks like this: 10^(500-1) = y^1000 [our exponent on the left side is 500-1 ] [because we said above that x was the ] [number of digits in our result ] Using our same method of logarithms after simplifying, we get: 499 = 1000 * log [y] which, after dividing the left side by 1000 to eliminate the 1000 from the right side, we have: 0.499 = log [y] Solving for y gives us: y = 10^0.499 = +/- 3.155 (approximately) The plus and minus are simply due to the fact that we put our answer to an even power, which means that whether its positive or negative, the result when we put it to the power will make our answer positive. However, your book is actually incorrect in its answer of the square root of 10, and here's why: The person who wrote that answer in the book forgot that the exponent on the left side is (x-1), not just x. The reason this will give us an incorrect answer is because if you forget to subtract 1 from both sides, you are actually finding a number with 501 digits, not 500. You can check that on your own by seeing what happens when you solve the problem without subtracting in the exponent. You would end up with: 0.5 = log [y] which would give you: y = 10^0.5 = 10^(1/2) = +/- sqrt(10) But like we said, that is a 501 digit number because if we plug sqrt (10) in for y in our first line, we would have: [sqrt(10)]^1000, which equals 10^500 However, we pointed out that because 10^1 has two digits, 10^2 has three digits, etc..., that means that 10^500 has 501 digits, which was not what we were looking for. It's pretty easy to prove that rule, so I'll show a quick, informal proof of it. Every two-digit number can be written in the form 10*a + b, where a and b are two one-digit numbers. For example, 37 = 10*3 + 7. That means that: 10^x = 10*a + b, where 1 <= x < 2 If we multiply both sides by 10, we get: (10^x)*(10) = (10*a)*(10) + b*(10) which simplifies to: 10^(x+1) = 100*a + 10*b, where 2 <= x + 1 < 3 Now, since the left side is a number with a in the hundreds place, b in the tens place and zero in the ones place, we see that if our exponent is between 1 and 2, we have a two-digit number, if it's between 2 and 3, we have a three-digit number, etc... which we can show for all exponents using that idea. Notice that we said in our first step that 1 <= x < 2. This is because 10^1 = 10, but 10^2 = 100, which doesn't only have a tens place and a ones place. That means that we couldn't include 2 as a possible value for x in our first equation, and since all we did for the possible x values for the next step was add 1 to all sides in our first inequality, it would not include that upper value anytime. That shows us why we always have to round down for our number of digits. This was just an informal and basic proof, but hopefully you followed it without much trouble. That type of proof is loosely based on an idea called mathematical induction, which you can learn a little about in the Dr. Math Archive: Explaining Mathematical Induction http://mathforum.org/library/drmath/view/55659.html I hope this helped, but if you have any more questions please let me know! - Doctor Ricky, The Math Forum http://mathforum.org/dr.math/ Date: 06/26/2007 at 12:52:18 From: Y Subject: Thank you (antilogarithms) Hi Dr. Ricky, Thank you so much for your wonderful explanation. I really appreciated it. I have one more question about this. What if the question asks you to find a number which has 500 digits (base 8, not 10) when raised to the 1000th power, and express the number in both base 8 and 10? Regards, Yifeng Date: 06/26/2007 at 14:35:21 From: Doctor Ricky Subject: Re: antilogarithms Hey Yifeng, Thanks for writing back! To solve this problem, we use practically the exact same method. First, let's examine the numbers in base 8 and compare that to our knowledge of base 10. In the base 8 number system, one-digit numbers are 0, 1, 2, 3, 4, 5, 6, 7 When we get to "8", our system goes to the two-digit number 10 because there are no one-digit numbers after 7 in the base 8 system (also called the octal system, similar to the base 10 system being called the decimal system). We can see that we don't achieve a three-digit number until we get to 100, which would happen if we have 8^2. Notice that this pattern exactly follows the pattern we used last time. This means that if we want to find a 500-digit number in the octal system, the lowest such value (meaning a 1 with 499 zeros after it) would be: 8^(500-1) which we can then convert to the decimal system following the exact ideas used in the answer I gave to your last question. Let's try a couple examples: (1) How many digits does the decimal number 3^6 have in the octal system? Well, to answer this one, we are comparing a decimal number to an octal number. We are looking for the number of digits it has in the octal system, so we would use our equation we discussed above as well as in our last correspondence and have: 8^(x-1) = 3^6 Taking the logarithms of both sides with base 8 (so we can solve for x), we get: x - 1 = log(8) [3^6] [log, base 8, of 3^6] Using our laws of exponents inside the logarithm and the change-of- base formula gives us: x - 1 = 6*log[3]/log[8] which gives us: x = 6*log[3]/log[8] + 1 = 4.170 Again, since we are talking about digits, we must round down. That means that 3^6 in the octal system has four digits, which we can see with the expansion of the number: 3^6 = 1*(8^3) + 3*(8^2) + 3*(8^1) + 1*(8^0) = 1331(base 8) (2) Now we will answer your question: find a number with 500 digits in the octal system when put to the 1000th power and find its octal and decimal representation. If a number has 500 digits in the octal system and it is equal to another octal number to the 1000th power, we have: 8^(500-1) = y^1000 which simplifies using logarithms in the octal system (base 8) to 499 = 1000 * log(8) [y] which is: 0.499 = log(8) [y] which implies that y = 8^0.499 = 2.82255 (in the DECIMAL system) However, we said that y was an octal number in order to set up our equality. That means we need to think of our value for y in terms of powers of 8 again: 2.82255 = 2*(10^0) + 8*(10^-1) + 2*(10^-2) + ... Using this idea, we can talk about "decimals" or the digits after the decimal point, in any base we want. Remember that in the decimal system, all digits are in terms of powers of 10. It would make sense then that in the octal system, all digits are in terms of powers of 8. Using that for our question, that means that: 2.82255 = a/(8^0) + b/(8^1) + c/(8^2) + ... where a,b,c,... are integers. Now we just simplify the right side by equating the integer parts from each. Since 8^0 = 1 and a/1 = a, the integer part on the left side must be equal to a. Therefore, a = 2. To find what b is, let's subtract a (which is equal to 2) from both sides. We get: 0.82255 = b/8 + c/(8^2) + d/(8^3) + ... Now, we said our variables a,b,c,... are all integers and we can equate integer parts, so let's multiply both sides by 8 so we can find what b is. Note that because the right side is already in the octal system, we can just multiply the right side as we normally do. 6.5804 = b + c/8 + d/(8^2) + ... That means that b = 6. We can continue this process until we notice a pattern (just like a repeating decimal in base 10) or it may not create a pattern (again, like an irrational decimal such as sqrt(2)) and we can just stop when we feel that we have enough accurate places. After a few more calculations, we can write 2.82255 = 2.6451124... That tells us that in the octal system: (2.6451124...)^1000 has 500 digits. And since the left side of our original equation was 8^(500-1), which is the FIRST time in the octal system that a number has 500 digits, we know that this number is the same (again, in the OCTAL system) as a 1 with 499 zeros after it. To find the decimal representation of this octal number, we simply alter our first equation above in terms of base 10 to read: 10^(x-1) = (2.82255)^1000 [since 2.82255 is in the decimal ] [system ] Again, using our logarithm idea to find what x is: x - 1 = 1000 * log [2.82255] = 450.64 means x = 451.64 So our octal number with 500 digits, when converted to the decimal system, has 451 digits (due to rounding down). You wanted an accurate decimal representation of this number, but it would be extremely impractical to find it for a number this large without a computer performing the calculations, so I cannot show you. Feel free, though, to test it out with much smaller numbers (like two-digit numbers). Also, you may have noticed that the number of digits in our octal number and our decimal number were somewhat close. This is true in general: when converting numbers between two different number systems, the number of digits in each expansion are closer as the bases of the two systems get closer. This means that if we converted from a base 8 number system to a base 9 number system, the number of digits of the respective expansions would be closer to each other than converting from base 8 to our base 10 system. If you have any more questions, please do not hesitate to write back! - Doctor Ricky, The Math Forum http://mathforum.org/dr.math/ Date: 06/26/2007 at 14:53:03 From: Y Subject: Thank you (antilogarithms) Hi Dr. Ricky, Thanks again for your help! Regards, Yifeng |
Search the Dr. Math Library: |
[Privacy Policy] [Terms of Use]
Ask Dr. Math^{TM}
© 1994- The Math Forum at NCTM. All rights reserved.
http://mathforum.org/dr.math/