|


Evaluating Large NumbersDate: 06/11/98 at 17:04:09 From: Clifton Subject: long equation There's this math problem I have for science. It is very long and will take a long time to figure out. Also, the number is too long for my calculator. I need to know 2^71 * 3.
Date: 06/12/98 at 16:50:16
From: Doctor Peterson
Subject: Re: long equation
Hi, Clifton,
I'd love to know what problem gave you such a big number to work out!
It's actually not as big as some numbers I could make up, and if you
really wanted to you could probably work it out in less than a day.
I'll show you how you could do that, and how to get a "good enough"
answer with less work.
If you want to calculate it exactly, there are some tricks you could
use, based on your knowledge of exponents. You are probably aware, or
can see why it's true, that:
2^71 = 2^64 * 2^7
(That's just because to multiply 71 2's I can first multiply 64 of
them, then multiply the other 7, and then put them together.) Why did
I pick 64? Because I can get that value in just a few steps:
2^64 = (2^32)^2 = ( (2^16)^2 )^2 = ( ( (2^8)^2 )^2 )^2
See what I'm doing? Each time I just split a bunch of two's into two
equal groups, so I'm just squaring a smaller number. I know that
2^8 = 256, so you just have to square that, then square it again, then
square it one more time, then multiply the result by 2^7 = 128 and
again by 3, and you'll have your answer. That's just five (big)
multiplications you have to do! It may take a lot less than a day.
There's a quicker way to evaluate this sort of number if you don't
need to get every digit right. If your calculator has a "LOG" key,
that gives you a shortcut to find the answer. It calculates the
logarithm of the number, which has special properties that make it
easy to multiply - in fact, before calculators were invented, we used
to learn how to use either slide rules (which use logarithms) or
tables of logarithms for this purpose all the time.
I'll assume that you don't know about logarithms, and give a quick
explanation. (If you don't follow all this, just skip down to the end,
where I have some more fun stuff for you.) The basic idea is that the
logarithm of a number is the power of ten that represents the number.
For instance, log(100) = 2 because 100 = 10^2. All positive numbers
have logarithms, not just the powers of ten. For example, your
calculator will tell you that log(2) = 0.301030. Now, just as I
showed you above, when you multiply powers of some number together,
it's the same as adding the powers. I showed you that
2^71 = 2^64 * 2^7. In the same way:
10^71 = 10^64 * 10^7
and:
log(10^71) = 71 = 64 + 7 = log(10^64) + log(10^7)
So if you add the logarithms of two numbers, you get the logarithm of
their product.
Similarly:
log( (10^32)^2 ) = log( (10^32) * (10^32) )
= log(10^32) + log(10^32)
= 2 * log(10^32)
so the logarithm of a power is a multiple of the logarithm.
Let's apply that to your problem:
log(2^71 * 3) = log(2^71) + log(3)
= 71 * log(2) + log(3)
= 21.850251
Now you can just undo the logarithm. On my PC calculator, you do that
by pressing "INV" (which does the inverse, or opposite, of the
following key) and then "LOG" to get:
2^71 * 3 = 7.083549724305e+21
which is calculator-speak for:
7.083549724305 * 10^21 = about 7,083,549,724,305,000,000,000
There's one more way to solve this. On my UNIX computer there's a
program called "bc" (I think it stands for "big calculator") that can
calculate using numbers of any length at all. I ran that and got an
exact answer of:
7,083,549,724,304,467,820,544
This shows that the logarithms did pretty well.
Here are two answers we've given to a similar problem that might
interest you:
http://mathforum.org/dr.math/problems/pearce12.11.97.html
http://mathforum.org/dr.math/problems/sean9.10.97.html
-Doctor Peterson, The Math Forum
Check out our web site! http://mathforum.org/dr.math/
|
Search the Dr. Math Library: |
[Privacy Policy] [Terms of Use]


Ask Dr. MathTM
© 1994-2008 The Math Forum
http://mathforum.org/dr.math/