Discussion about math, puzzles, games and fun. Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ π -¹ ² ³ °

You are not logged in.

- Topics: Active | Unanswered

**ganesh****Moderator**- Registered: 2005-06-28
- Posts: 20,922

I tried using the scientific calculator on this website.

I wanted the value of 2^2520. I got the result 'infinity'.

I found that the calculator gives a result for 2^1022, but for 2^1023, you get infinity. Can the 'infinity' be substituted by 'error' or 'out of range'?

It is no good to try to stop knowledge from going forward. Ignorance is never better than knowledge - Enrico Fermi.

Nothing is better than reading and gaining more and more knowledge - Stephen William Hawking.

Offline

**ryos****Member**- Registered: 2005-08-04
- Posts: 394

2^2520

39408424552214162695348543183638915172819172249751642655322154182349\

33676588009610655644786388200003560563883371670355420740089454019139\

50236214360506399705231203021164366069389563701733455174652493802096\

52827965938125948350891617678251689261632215488187059650565457777432\

98081872565023704682568753763162781359379857881608885188091378378731\

80086327183792757748702946460720720770436177477377229784500022657580\

65723362838393013791461968400922079126708976855218290361860314695008\

42192427800725780716480012657266798737517723023431143584285521349919\

38056446803917216962620267368806273089867659639177213488960155211698\

14921103068177978857814105435927428955641140043659870492782127521488\

14889702185765573255518895775073409289563384104009610960263526424138\

31783448576

Hey ganesh, what kind of computer are you using? Unix and lookalikes have a program called bc; it's an arbitrary precision calculator. Just for fun, I typed 2^312500 into it, and it spat out the answer, full and complete, in about 5 seconds. Not bad.

If you happen to be running Windows, there is a program called Cygwin (I think) that emulates a unixy environment. You might give it a look.

El que pega primero pega dos veces.

Offline

**MathsIsFun****Administrator**- Registered: 2005-01-21
- Posts: 7,615

Yeah, "infinity" is not correct. "Overflow" ?

And for arbitratry precision: Full Precision Calculator.

I developed that about six months ago (based on work I had done before and several examples on the web), and so the full source code is available, and we can make it do other cool things if we want !

"The physicists defer only to mathematicians, and the mathematicians defer only to God ..." - Leon M. Lederman

Offline

**ganesh****Moderator**- Registered: 2005-06-28
- Posts: 20,922

ryos wrote:

Hey ganesh, what kind of computer are you using? Unix and lookalikes have a program called bc; it's an arbitrary precision calculator. Just for fun, I typed 2^312500 into it, and it spat out the answer, full and complete, in about 5 seconds. Not bad.

Well ryos, your post was enlightening. I work on windows.

If you have the time, could you do me a favor?

Run 2^12500, 2^62500 and 2^312500 (and 2^1562500 too, if possible), and just give me the last ten digits.

I am working on something and seeing a pattern.

It may not take more than 10 minutes. I don't have the paraphernalia. Your help would be greatly appreciated.

*Last edited by ganesh (2005-11-16 19:17:08)*

It is no good to try to stop knowledge from going forward. Ignorance is never better than knowledge - Enrico Fermi.

Nothing is better than reading and gaining more and more knowledge - Stephen William Hawking.

Offline

**MathsIsFun****Administrator**- Registered: 2005-01-21
- Posts: 7,615

2^12500 ends in ...70299109376 according to the Full Precision Calculator.

That was 2^100 (took a second) ^25 (took 43 seconds) ^5 (took 400 seconds)

There were 3763 digits in the answer.

Now, isn't it possible to just ignore most of those digits and just concentrate on the last dozen or so?

For example to calculate the last few digits of 2^62500 we just use 70299109376^5 , ie: (the last few digits of 2^12500)^5

Is this right?

"The physicists defer only to mathematicians, and the mathematicians defer only to God ..." - Leon M. Lederman

Offline

**ganesh****Moderator**- Registered: 2005-06-28
- Posts: 20,922

Yes, that appears right. We can do by concentrating on the last 20 digits. That's made my job much easier. The point I wanted to prove was that we get an additonal digit in the sequence of the magic number ....................................893380022607743740081787109376,

by multiplying the power of 2 by 5 each time.

2^4 ends in 6.

2^20 ends in 76.

2^100 ends in 376.

2^500 ends in 9376.

2^2500 ends in 09376.

2^12500 ends in 109376

2^62500 ends in 7109376

2^312500 ends in 87109376 (???) and so on.

That is, 2^(4*5^n) gives n+1 digits of the magic number.

That is quite a pattern, isn't it?

I have no experience of working in Unix or any other OS. I belong to the pre IT revolution era

It is no good to try to stop knowledge from going forward. Ignorance is never better than knowledge - Enrico Fermi.

Nothing is better than reading and gaining more and more knowledge - Stephen William Hawking.

Offline

**mathsyperson****Moderator**- Registered: 2005-06-22
- Posts: 4,900

ganesh wrote:

That is, 2^(4*5^n) gives n+1 digits of the magic number.

That is quite a pattern, isn't it?

I think I said something of a similar nature a while ago. I can't find it though.

Why did the vector cross the road?

It wanted to be normal.

Offline

**ryos****Member**- Registered: 2005-08-04
- Posts: 394

2^12500 ends in: 38413079360370299109376

2^62500 ends in: 35077828320112175538998220106163281524347109376

2^312500 ends in: 2616427893377447294587109376

2^1562500 ends in: 28458279155722394465726629493874312276145787109376

That last answer was about 125 pages long! (Well, terminal screens anyway)

Here's a puzzler for you. If the program wraps the answer to 69 numbers per line, how many lines are in the answer to 2^1562500?

I wouldn't know how to solve that!

El que pega primero pega dos veces.

Offline

**mathsyperson****Moderator**- Registered: 2005-06-22
- Posts: 4,900

log(2) 2^1562500 = 1562500, by definition.

Converting this to log(10) would give this in the form 10^x and so rounding up to the nearest integer would give the amount of digits.

One of the laws of logs is that log(a) b = log(c) b ÷ log(c) a.

Using this gives that log(2) 2^1562500 = log(10) 2^1562500 ÷ log(10) 2

Rearranging gives log(10) 2^1562500 = 1562500 * log(10) 2

Excel calculates this as 470359.3682, so it would have 470360 digits.

If the program wraps to 69 digits per line, then it would take up 470360÷69 lines, which is 6817 lines, when rounded up.

Why did the vector cross the road?

It wanted to be normal.

Offline

**ryos****Member**- Registered: 2005-08-04
- Posts: 394

2^7812500 ends in: 719540313499900586420401787109376

Oh yeah, logarithms. Duh. Nice job!

El que pega primero pega dos veces.

Offline

**ganesh****Moderator**- Registered: 2005-06-28
- Posts: 20,922

Thanks, ryos.

Your help is appreciated. You have gone one step further and given the last few digits of 2^7812500. I am grateful to you.

Logarithms can be of great help in calculating higher powers. You don't get the exact value, but a very close answer. However, the number of digits is not affected unless the power is very high.

mathsyperson wrote:

I think I said something of a similar nature a while ago. I can't find it though.

Is it here?

Nothing is better than reading and gaining more and more knowledge - Stephen William Hawking.

Offline

**mathsyperson****Moderator**- Registered: 2005-06-22
- Posts: 4,900

That was it. So I'm not going crazy after all. Thanks!

Why did the vector cross the road?

It wanted to be normal.

Offline

**ryos****Member**- Registered: 2005-08-04
- Posts: 394

Hey, anything to help the search for a higher power.

El que pega primero pega dos veces.

Offline

**ganesh****Moderator**- Registered: 2005-06-28
- Posts: 20,922

2^39062500, 2^195312500?

Nothing is better than reading and gaining more and more knowledge - Stephen William Hawking.

Offline

**ryos****Member**- Registered: 2005-08-04
- Posts: 394

2^39062500 ends in: 88796961139264145200433071957141681787109376

I let it run all night, so I don't know how long it took. I'll run 2^195312500 tonight...

El que pega primero pega dos veces.

Offline

**MathsIsFun****Administrator**- Registered: 2005-01-21
- Posts: 7,615

ryos wrote:

I'll run 2^195312500 tonight...

... you hope!

"The physicists defer only to mathematicians, and the mathematicians defer only to God ..." - Leon M. Lederman

Offline

**ryos****Member**- Registered: 2005-08-04
- Posts: 394

How did you know I'd be up all night writing a research paper? >:[

Maybe tonight...

El que pega primero pega dos veces.

Offline

**ryos****Member**- Registered: 2005-08-04
- Posts: 394

Well, I've hit the limit. I typed 2^195312500 into bc, and it merrily spit "Runtime error (func=(main), adr=15): exponent too large in raise" back at me. There must be an open-source calculator out there that could do it...I may just need to have a look.

El que pega primero pega dos veces.

Offline

**ganesh****Moderator**- Registered: 2005-06-28
- Posts: 20,922

ryos wrote:

Well, I've hit the limit. I typed 2^195312500 into bc, and it merrily spit "Runtime error (func=(main), adr=15): exponent too large in raise" back at me.

Thats okay, ryos.

So the bc cannot handle 58,794,922 digits!

I hope I am not too demanding.

When you have the time, can you run 6^1953125 and post the last 10 digits. That would be only 1,519,827 dcigits

Thanks, in advance.

Nothing is better than reading and gaining more and more knowledge - Stephen William Hawking.

Offline

**ryos****Member**- Registered: 2005-08-04
- Posts: 394

6^1953125 ends in: 02220063994332456747346268935437376264942880349499173996030029353486977990646384748721787109376

El que pega primero pega dos veces.

Offline

**ganesh****Moderator**- Registered: 2005-06-28
- Posts: 20,922

I am sure you missed the last few digits.

(A power of 6 can never end in 8!)

Anyway, thanks a lot. You have been of great help.

Nothing is better than reading and gaining more and more knowledge - Stephen William Hawking.

Offline

**MathsIsFun****Administrator**- Registered: 2005-01-21
- Posts: 7,615

Maybe you couldn't see the last few digits, ganesh.

Ryos' number ends in 86977990646384748721787109376

Offline

**ganesh****Moderator**- Registered: 2005-06-28
- Posts: 20,922

I still cannot see it in ryos' post! Okay, MathsIsFun, thats exactly the result I wanted.

Now I've got a good proof, and I wouldn't be troubling MathsIsFun and ryos anymore You two, along with Mathsyperson have helped me a lot.

*Last edited by ganesh (2005-11-24 00:18:36)*

Nothing is better than reading and gaining more and more knowledge - Stephen William Hawking.

Offline

**Wodd****Member**- Registered: 2010-12-26
- Posts: 11

I was trying to find the 1,852,083rd prime number and the 1,852,083rd Fibonacci number to full precision. I found the prime number (29,901,239). Since it is only eight digits long, this was not that big of a deal. I am still trying to figure out all of the digits of the Fibonacci number though. Perhaps someone can help me with this.

I love Daisy!

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 104,306

Hi Wodd;

Welcome to the forum!

F(1852083) is over 387 000 digits long. Too big for a post.

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.** **A number by itself is useful, but it is far more useful to know how accurate or certain that number is.**

Offline