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

You are not logged in.

#151 2013-04-09 07:59:14

Agnishom
Real Member
From: The Complex Plane
Registered: 2011-01-29
Posts: 18,897
Website

Re: Mathematics jokes

Ya because at last we can check whether it has the required number of primes or not. And moreover, the number of primes can be less but NEVER more because if it says that a number is composite it definately is


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
'You have made another human being happy. There is no greater accomplishment.' -bobbym

Offline

#152 2013-04-09 08:02:44

bobbym
Administrator
From: Bumpkinland
Registered: 2009-04-12
Posts: 90,796

Re: Mathematics jokes

Okay, so we have sped it up already because you are no longer using trial division, which is slow.

Let's talk about the list itself. 455 million primes is a very, very big list. There is no list like that on the internet and for good reason. It is going to be a gigabyte or more.


In mathematics, you don't understand things. You just get used to them.

I agree with you regarding the satisfaction and importance of actually computing some numbers. I can't tell you how often I see time and money wasted because someone didn't bother to run the numbers.

Offline

#153 2013-04-09 08:04:37

Agnishom
Real Member
From: The Complex Plane
Registered: 2011-01-29
Posts: 18,897
Website

Re: Mathematics jokes

Okay! A gigabite?

That's quite huge

Last edited by Agnishom (2013-04-09 08:05:04)


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
'You have made another human being happy. There is no greater accomplishment.' -bobbym

Offline

#154 2013-04-09 08:07:00

bobbym
Administrator
From: Bumpkinland
Registered: 2009-04-12
Posts: 90,796

Re: Mathematics jokes

Each prime you will probably store in ascii. An n digit number takes at least n bytes of storage on your drive.

Do you keep the file open and then write all the primes and then close it?


In mathematics, you don't understand things. You just get used to them.

I agree with you regarding the satisfaction and importance of actually computing some numbers. I can't tell you how often I see time and money wasted because someone didn't bother to run the numbers.

Offline

#155 2013-04-09 08:07:51

Agnishom
Real Member
From: The Complex Plane
Registered: 2011-01-29
Posts: 18,897
Website

Re: Mathematics jokes

Yes, actually closing it isn't a part of the code

Last edited by Agnishom (2013-04-09 08:08:24)


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
'You have made another human being happy. There is no greater accomplishment.' -bobbym

Offline

#156 2013-04-09 08:11:11

bobbym
Administrator
From: Bumpkinland
Registered: 2009-04-12
Posts: 90,796

Re: Mathematics jokes

So there is one opening of the file and one closing?


In mathematics, you don't understand things. You just get used to them.

I agree with you regarding the satisfaction and importance of actually computing some numbers. I can't tell you how often I see time and money wasted because someone didn't bother to run the numbers.

Offline

#157 2013-04-09 08:12:30

Agnishom
Real Member
From: The Complex Plane
Registered: 2011-01-29
Posts: 18,897
Website

Re: Mathematics jokes

Yes, so what?

I was talking with 65 and I'm already too late to sleep today.


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
'You have made another human being happy. There is no greater accomplishment.' -bobbym

Offline

#158 2013-04-09 08:15:16

bobbym
Administrator
From: Bumpkinland
Registered: 2009-04-12
Posts: 90,796

Re: Mathematics jokes

Okay, that is alright then. If you opened and closed it after writing each number n, it would be much slower.

Now you say that it took all night to generate 1 million primes.


In mathematics, you don't understand things. You just get used to them.

I agree with you regarding the satisfaction and importance of actually computing some numbers. I can't tell you how often I see time and money wasted because someone didn't bother to run the numbers.

Offline

#159 2013-04-09 08:19:26

Agnishom
Real Member
From: The Complex Plane
Registered: 2011-01-29
Posts: 18,897
Website

Re: Mathematics jokes

LOL, good night

Its 10 million


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
'You have made another human being happy. There is no greater accomplishment.' -bobbym

Offline

#160 2013-04-09 08:24:51

bobbym
Administrator
From: Bumpkinland
Registered: 2009-04-12
Posts: 90,796

Re: Mathematics jokes

When you come back tell me how long the program took without writing to the file.


In mathematics, you don't understand things. You just get used to them.

I agree with you regarding the satisfaction and importance of actually computing some numbers. I can't tell you how often I see time and money wasted because someone didn't bother to run the numbers.

Offline

#161 2013-04-09 16:03:25

Agnishom
Real Member
From: The Complex Plane
Registered: 2011-01-29
Posts: 18,897
Website

Re: Mathematics jokes

I am back but I didn't understand what you asked

Last edited by Agnishom (2013-04-09 16:06:53)


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
'You have made another human being happy. There is no greater accomplishment.' -bobbym

Offline

#162 2013-04-09 16:13:19

bobbym
Administrator
From: Bumpkinland
Registered: 2009-04-12
Posts: 90,796

Re: Mathematics jokes

If you took out the writing to the file and just generated the 10 million how long would that take?

It could be that writing to a file is what is taking all the time. If you think 10 million is still too much then tell me how long it takes for 1 million without the file operations.


In mathematics, you don't understand things. You just get used to them.

I agree with you regarding the satisfaction and importance of actually computing some numbers. I can't tell you how often I see time and money wasted because someone didn't bother to run the numbers.

Offline

#163 2013-04-09 16:39:40

Agnishom
Real Member
From: The Complex Plane
Registered: 2011-01-29
Posts: 18,897
Website

Re: Mathematics jokes

Then where will the generated primes go?


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
'You have made another human being happy. There is no greater accomplishment.' -bobbym

Offline

#164 2013-04-09 19:12:00

bobbym
Administrator
From: Bumpkinland
Registered: 2009-04-12
Posts: 90,796

Re: Mathematics jokes

Nowhere, you are just benchmarking the program to see which part of the routine is using the most time.


In mathematics, you don't understand things. You just get used to them.

I agree with you regarding the satisfaction and importance of actually computing some numbers. I can't tell you how often I see time and money wasted because someone didn't bother to run the numbers.

Offline

#165 2013-04-09 20:30:53

Agnishom
Real Member
From: The Complex Plane
Registered: 2011-01-29
Posts: 18,897
Website

Re: Mathematics jokes

i have forgotten to mention something else which is slowing me down


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
'You have made another human being happy. There is no greater accomplishment.' -bobbym

Offline

#166 2013-04-09 20:34:59

bobbym
Administrator
From: Bumpkinland
Registered: 2009-04-12
Posts: 90,796

Re: Mathematics jokes

Please mention it?!


In mathematics, you don't understand things. You just get used to them.

I agree with you regarding the satisfaction and importance of actually computing some numbers. I can't tell you how often I see time and money wasted because someone didn't bother to run the numbers.

Offline

#167 2013-04-09 20:40:02

Agnishom
Real Member
From: The Complex Plane
Registered: 2011-01-29
Posts: 18,897
Website

Re: Mathematics jokes

I told it to display n to the console whenever it is a multiple of 1000, so as to know the progress


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
'You have made another human being happy. There is no greater accomplishment.' -bobbym

Offline

#168 2013-04-09 20:46:39

bobbym
Administrator
From: Bumpkinland
Registered: 2009-04-12
Posts: 90,796

Re: Mathematics jokes

Where are you now?


In mathematics, you don't understand things. You just get used to them.

I agree with you regarding the satisfaction and importance of actually computing some numbers. I can't tell you how often I see time and money wasted because someone didn't bother to run the numbers.

Offline

#169 2013-04-09 20:50:48

Agnishom
Real Member
From: The Complex Plane
Registered: 2011-01-29
Posts: 18,897
Website

Re: Mathematics jokes

I terminated the program, I have no more interest -a 17 mb file is enough to split all 10 digit phone numbers.


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
'You have made another human being happy. There is no greater accomplishment.' -bobbym

Offline

#170 2013-04-09 20:55:02

bobbym
Administrator
From: Bumpkinland
Registered: 2009-04-12
Posts: 90,796

Re: Mathematics jokes

Okay, then the problem is solved. You are satisfied so I am too.


In mathematics, you don't understand things. You just get used to them.

I agree with you regarding the satisfaction and importance of actually computing some numbers. I can't tell you how often I see time and money wasted because someone didn't bother to run the numbers.

Offline

#171 2013-04-09 20:56:59

Agnishom
Real Member
From: The Complex Plane
Registered: 2011-01-29
Posts: 18,897
Website

Re: Mathematics jokes

Actually I am pretty much afraid of 1 gb file size


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
'You have made another human being happy. There is no greater accomplishment.' -bobbym

Offline

#172 2013-04-09 21:02:25

bobbym
Administrator
From: Bumpkinland
Registered: 2009-04-12
Posts: 90,796

Re: Mathematics jokes

You should be! You have had your first taste of computational number theory and saw the big problem.


In mathematics, you don't understand things. You just get used to them.

I agree with you regarding the satisfaction and importance of actually computing some numbers. I can't tell you how often I see time and money wasted because someone didn't bother to run the numbers.

Offline

#173 2013-04-09 21:24:17

Agnishom
Real Member
From: The Complex Plane
Registered: 2011-01-29
Posts: 18,897
Website

Re: Mathematics jokes

What does computational number theory consist of?


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
'You have made another human being happy. There is no greater accomplishment.' -bobbym

Offline

#174 2013-04-09 21:24:58

bobbym
Administrator
From: Bumpkinland
Registered: 2009-04-12
Posts: 90,796

Re: Mathematics jokes

You just did it.


In mathematics, you don't understand things. You just get used to them.

I agree with you regarding the satisfaction and importance of actually computing some numbers. I can't tell you how often I see time and money wasted because someone didn't bother to run the numbers.

Offline

#175 2013-04-09 21:29:01

Agnishom
Real Member
From: The Complex Plane
Registered: 2011-01-29
Posts: 18,897
Website

Re: Mathematics jokes

Hmm

I am surprised no one is happy to see that their phone number as a sum of two primes. Not even my dad.
My brother seems a 'little' happy though


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
'You have made another human being happy. There is no greater accomplishment.' -bobbym

Offline

Board footer

Powered by FluxBB