Math Is Fun Forum

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

You are not logged in.

#1 2005-11-15 01:11:51

Jai Ganesh
Administrator
Registered: 2005-06-28
Posts: 45,956

Scientific Calculator

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 appears to me that if one wants to make progress in mathematics, one should study the masters and not the pupils. - Niels Henrik Abel.

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

Offline

#2 2005-11-15 05:25:48

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

Re: Scientific Calculator

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

#3 2005-11-15 08:37:12

MathsIsFun
Administrator
Registered: 2005-01-21
Posts: 7,711

Re: Scientific Calculator

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

#4 2005-11-16 19:16:15

Jai Ganesh
Administrator
Registered: 2005-06-28
Posts: 45,956

Re: Scientific Calculator

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. smile

Last edited by Jai Ganesh (2005-11-16 19:17:08)


It appears to me that if one wants to make progress in mathematics, one should study the masters and not the pupils. - Niels Henrik Abel.

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

Offline

#5 2005-11-16 22:00:42

MathsIsFun
Administrator
Registered: 2005-01-21
Posts: 7,711

Re: Scientific Calculator

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

#6 2005-11-16 23:24:29

Jai Ganesh
Administrator
Registered: 2005-06-28
Posts: 45,956

Re: Scientific Calculator

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? smile
I have no experience of working in Unix or any other OS. I belong to the pre IT revolution era sad


It appears to me that if one wants to make progress in mathematics, one should study the masters and not the pupils. - Niels Henrik Abel.

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

Offline

#7 2005-11-17 04:13:31

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

Re: Scientific Calculator

ganesh wrote:

That is, 2^(4*5^n) gives n+1 digits of the magic number.
That is quite a pattern, isn't it? smile

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

#8 2005-11-17 05:39:49

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

Re: Scientific Calculator

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

#9 2005-11-17 06:12:20

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

Re: Scientific Calculator

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

#10 2005-11-17 14:09:08

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

Re: Scientific Calculator

2^7812500 ends in: 719540313499900586420401787109376

Oh yeah, logarithms. Duh. Nice job! smile


El que pega primero pega dos veces.

Offline

#11 2005-11-17 15:49:20

Jai Ganesh
Administrator
Registered: 2005-06-28
Posts: 45,956

Re: Scientific Calculator

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?


It appears to me that if one wants to make progress in mathematics, one should study the masters and not the pupils. - Niels Henrik Abel.

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

Offline

#12 2005-11-18 04:02:06

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

Re: Scientific Calculator

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

#13 2005-11-18 10:26:06

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

Re: Scientific Calculator

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


El que pega primero pega dos veces.

Offline

#14 2005-11-18 17:10:10

Jai Ganesh
Administrator
Registered: 2005-06-28
Posts: 45,956

Re: Scientific Calculator

2^39062500, 2^195312500? smile smile smile smile smile


It appears to me that if one wants to make progress in mathematics, one should study the masters and not the pupils. - Niels Henrik Abel.

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

Offline

#15 2005-11-20 04:26:04

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

Re: Scientific Calculator

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

#16 2005-11-20 08:31:18

MathsIsFun
Administrator
Registered: 2005-01-21
Posts: 7,711

Re: Scientific Calculator

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

#17 2005-11-21 03:47:21

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

Re: Scientific Calculator

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

Maybe tonight...


El que pega primero pega dos veces.

Offline

#18 2005-11-22 19:16:45

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

Re: Scientific Calculator

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

#19 2005-11-22 20:42:52

Jai Ganesh
Administrator
Registered: 2005-06-28
Posts: 45,956

Re: Scientific Calculator

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 smile
Thanks, in advance.


It appears to me that if one wants to make progress in mathematics, one should study the masters and not the pupils. - Niels Henrik Abel.

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

Offline

#20 2005-11-23 18:12:37

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

Re: Scientific Calculator

6^1953125 ends in: 02220063994332456747346268935437376264942880349499173996030029353486977990646384748721787109376


El que pega primero pega dos veces.

Offline

#21 2005-11-23 20:02:21

Jai Ganesh
Administrator
Registered: 2005-06-28
Posts: 45,956

Re: Scientific Calculator

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.  smile


It appears to me that if one wants to make progress in mathematics, one should study the masters and not the pupils. - Niels Henrik Abel.

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

Offline

#22 2005-11-23 20:37:50

MathsIsFun
Administrator
Registered: 2005-01-21
Posts: 7,711

Re: Scientific Calculator

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

Ryos' number ends in 86977990646384748721787109376


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

Offline

#23 2005-11-24 00:15:45

Jai Ganesh
Administrator
Registered: 2005-06-28
Posts: 45,956

Re: Scientific Calculator

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 smile You two, along with Mathsyperson have helped me a lot. smile
1.gif

Last edited by Jai Ganesh (2005-11-24 00:18:36)


It appears to me that if one wants to make progress in mathematics, one should study the masters and not the pupils. - Niels Henrik Abel.

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

Offline

#24 2011-04-05 08:24:27

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

Re: Scientific Calculator

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

#25 2011-04-05 09:55:26

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Scientific Calculator

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.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

Board footer

Powered by FluxBB