Hi
I haven't used excel for a long time and can't remember how to so much at all!
I need to start with a number 1, multiply it by 2, then multiply that answer
by 2, multiply that answer by 2 and carry on multiplying my answers by 2
until I have done this 480 times. The answers that excel is throwing out is
either as a decimal which is rounding it up and not giving a true answer, or
the answer I get is 4.72237E 21 (which doesn't mean anything at all to me i'm
afraid!)!
Can anybody help me to get a true calculation, without rounding up etc?
Any help would be much appreciated.
Thanks4.722371E 21 is 4.7 followed by 21 zeros, ie,
4,700,000,000,000,000,000,000,000,000.
You should expect a number this large if you are multiplying 2 by itself 480
times.
You can also simplify things greatly by using exponentiation. The formula
=2^480
will give you your answer. It's 3.1E144, so while your calculation was close,
you missed out on a few 2's.
--
Regards,
Fredquot;reckyrooquot; gt; wrote in message
...
gt; Hi
gt; I haven't used excel for a long time and can't remember how to so much at all!
gt; I need to start with a number 1, multiply it by 2, then multiply that answer
gt; by 2, multiply that answer by 2 and carry on multiplying my answers by 2
gt; until I have done this 480 times. The answers that excel is throwing out is
gt; either as a decimal which is rounding it up and not giving a true answer, or
gt; the answer I get is 4.72237E 21 (which doesn't mean anything at all to me i'm
gt; afraid!)!
gt; Can anybody help me to get a true calculation, without rounding up etc?
gt; Any help would be much appreciated.
gt; Thanks
gt;
quot;Fred Smithquot; gt; wrote in message
...
gt; quot;reckyrooquot; gt; wrote in message
gt; ...
gt;gt; Hi
gt;gt; I haven't used excel for a long time and can't remember how to so much at
gt;gt; all!
gt;gt; I need to start with a number 1, multiply it by 2, then multiply that
gt;gt; answer
gt;gt; by 2, multiply that answer by 2 and carry on multiplying my answers by 2
gt;gt; until I have done this 480 times. The answers that excel is throwing out
gt;gt; is
gt;gt; either as a decimal which is rounding it up and not giving a true answer,
gt;gt; or
gt;gt; the answer I get is 4.72237E 21 (which doesn't mean anything at all to me
gt;gt; i'm
gt;gt; afraid!)!
gt;gt; Can anybody help me to get a true calculation, without rounding up etc?
gt;gt; Any help would be much appreciated.
gt; 4.722371E 21 is 4.7 followed by 21 zeros, ie,
gt; 4,700,000,000,000,000,000,000,000,000.
gt;
gt; You should expect a number this large if you are multiplying 2 by itself
gt; 480 times.
gt;
gt; You can also simplify things greatly by using exponentiation. The formula
gt;
gt; =2^480
gt;
gt; will give you your answer. It's 3.1E144, so while your calculation was
gt; close, you missed out on a few 2's.
Missed more than a few, Fred.
4.722371E 21 is 2^72, rather than 2^480
[Note that your example showed 4.7E27, not 4.7E21]
The OP needs to realise that there will be rounding in a calculation as long
as this. Excel works to 15 significant figures, not the 145 figures that
this would need.
--
David Biddulph
Rowing web pages at
www.biddulph.org.uk/
gt; 2^480
gt; gt; Can anybody help me to get a true calculation...
Here's the answer. This took 0.3 seconds with Excel vba calling the ATP.
It's much faster if you use your own routines.
2^480 =
31217485503159922313815972297931663057485981426649 71150859156959625371738819765620120306103063491971 159826931121406622895447975679288285306290176
--
HTH. :gt;)
Dana DeLouis
Windows XP, Office 2003quot;reckyrooquot; gt; wrote in message
...
gt; Hi
gt; I haven't used excel for a long time and can't remember how to so much at
gt; all!
gt; I need to start with a number 1, multiply it by 2, then multiply that
gt; answer
gt; by 2, multiply that answer by 2 and carry on multiplying my answers by 2
gt; until I have done this 480 times. The answers that excel is throwing out
gt; is
gt; either as a decimal which is rounding it up and not giving a true answer,
gt; or
gt; the answer I get is 4.72237E 21 (which doesn't mean anything at all to me
gt; i'm
gt; afraid!)!
gt; Can anybody help me to get a true calculation, without rounding up etc?
gt; Any help would be much appreciated.
gt; Thanks
gt;
quot;Dana DeLouisquot; gt; wrote in message
...
gt;gt; 2^480
gt;gt; gt; Can anybody help me to get a true calculation...
gt; Here's the answer. This took 0.3 seconds with Excel vba calling the ATP.
gt; It's much faster if you use your own routines.
gt; 2^480 =
gt; 31217485503159922313815972297931663057485981426649 71150859156959625371738819765620120306103063491971 159826931121406622895447975679288285306290176
Interesting! Could you please expand a little on how you did this? I
hadn't realised that one could bypass Excel's 15 significant figure limit.
--
David Biddulph
gt; Could you please expand a little on how you did this? I hadn't realized
gt; that one could bypass Excel's 15 significant figure limit.
Hi. Excel can not do this directly. I used a rather short vba code to do
this.
To make the code simple, I used Excel's Fourier Transform in the ATP for all
the hard work.
I wanted to make only one pass with the code, but the 480 number is rather
on the limit without using advanced techniques. We note that Excel won't be
able to directly do what I call a 60*8 in the frequency domain. However,
Excel can do a 80*6. Therefore, we let Excel do as much of the hard work
directly as possible. First, find 2^80 in the time domain.
Sub Demo()
Dim n, ans
n = 80
ans = (CDec(0) 2 ^ 48) * (2 ^ (n Mod 48))
Debug.Print quot;2^80 = quot;; FormatNumber(ans, 0, , , vbTrue)
End Sub
2^80 = 1,208,925,819,614,629,174,706,176
That should answer your 15 digit question.
We then take the Fourier Transform...etc
Anyway...Hope this helps in some way. :gt;)
--
Dana DeLouis
Windows XP, Office 2003quot;David Biddulphquot; gt; wrote in message
news
gt; quot;Dana DeLouisquot; gt; wrote in message
gt; ...
gt;gt;gt; 2^480
gt;
gt;gt;gt; gt; Can anybody help me to get a true calculation...
gt;
gt;gt; Here's the answer. This took 0.3 seconds with Excel vba calling the ATP.
gt;gt; It's much faster if you use your own routines.
gt;gt; 2^480 =
gt;gt; 31217485503159922313815972297931663057485981426649 71150859156959625371738819765620120306103063491971 159826931121406622895447975679288285306290176
gt;
gt; Interesting! Could you please expand a little on how you did this? I
gt; hadn't realised that one could bypass Excel's 15 significant figure limit.
gt; --
gt; David Biddulph
gt;
- Jun 04 Wed 2008 20:44
How do I multiply numbers?
close
全站熱搜
留言列表
發表留言