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

You are not logged in.

## #1 2005-11-16 00:11:51

ganesh
Moderator

Offline

### 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'?

Character is who you are when no one is looking.

## #2 2005-11-16 04:25:48

ryos
Power Member

Offline

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

## #3 2005-11-16 07:37:12

MathsIsFun

Offline

### 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

## #4 2005-11-17 18:16:15

ganesh
Moderator

Offline

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

Last edited by ganesh (2005-11-17 18:17:08)

Character is who you are when no one is looking.

## #5 2005-11-17 21:00:42

MathsIsFun

Offline

### 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

## #6 2005-11-17 22:24:29

ganesh
Moderator

Offline

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

Character is who you are when no one is looking.

## #7 2005-11-18 03:13:31

mathsyperson
Moderator

Offline

### 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?

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.

## #8 2005-11-18 04:39:49

ryos
Power Member

Offline

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

## #9 2005-11-18 05:12:20

mathsyperson
Moderator

Offline

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

## #10 2005-11-18 13:09:08

ryos
Power Member

Offline

### Re: Scientific Calculator

2^7812500 ends in: 719540313499900586420401787109376

Oh yeah, logarithms. Duh. Nice job!

El que pega primero pega dos veces.

## #11 2005-11-18 14:49:20

ganesh
Moderator

Offline

### 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?

Character is who you are when no one is looking.

## #12 2005-11-19 03:02:06

mathsyperson
Moderator

Offline

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

## #13 2005-11-19 09:26:06

ryos
Power Member

Offline

### Re: Scientific Calculator

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

El que pega primero pega dos veces.

## #14 2005-11-19 16:10:10

ganesh
Moderator

Offline

### Re: Scientific Calculator

2^39062500, 2^195312500?

Character is who you are when no one is looking.

## #15 2005-11-21 03:26:04

ryos
Power Member

Offline

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

## #16 2005-11-21 07:31:18

MathsIsFun

Offline

### 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

## #17 2005-11-22 02:47:21

ryos
Power Member

Offline

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

## #18 2005-11-23 18:16:45

ryos
Power Member

Offline

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

## #19 2005-11-23 19:42:52

ganesh
Moderator

Offline

### 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

Character is who you are when no one is looking.

## #20 2005-11-24 17:12:37

ryos
Power Member

Offline

### Re: Scientific Calculator

6^1953125 ends in: 02220063994332456747346268935437376264942880349499173996030029353486977990646384748721787109376

El que pega primero pega dos veces.

## #21 2005-11-24 19:02:21

ganesh
Moderator

Offline

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

Character is who you are when no one is looking.

## #22 2005-11-24 19:37:50

MathsIsFun

Offline

### 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

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

ganesh
Moderator

Offline

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

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

Character is who you are when no one is looking.

## #24 2011-04-06 06:24:27

Wodd
Member

Offline

### 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!

## #25 2011-04-06 07:55:26

bobbym

Online

### 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.
Some cause happiness wherever they go; others, whenever they go.
If you can not overcome with talent...overcome with effort.