Hard Light Productions Forums
Off-Topic Discussion => General Discussion => Topic started by: Primus on March 04, 2005, 11:01:36 am
-
http://www.guardian.co.uk/life/news/story/0,12976,1428429,00.html
Isn't it great? I'm asking because I don't know and math is something that gives me a headache.
So, the longest prime number was discovered.. What now?
-
Now they find a bigger one.
I have to admit, I'm not entirely sure how important it is to find an 8 million digit prime.....
-
Well you could use it to make one hell of a unique hash code :D
-
indeed
-
Originally posted by Primus
So, the longest prime number was discovered.. What now?
There is no biggest prime number.
The set of primes is infinite, which was shown by Euclid in of the most elegant pieces of pure mathematical reasoning.
But yes...big prime numbers are useful for kryptographic methods.
-
http://members.surfeu.fi/kklaine/primebear.html
-
:lol: That explains everything!
-
So, the longest prime number was discovered.. What now?
Sounds to me like this eye specialist has far too much time on his hands. But still, a semi-important discovery. :rolleyes:
-
Maybe someone will work out Pi
-
#undef Pi
#define Pi 3.141592654f
There. :p
-
Just for fun, I wrote a program that will calculate all prime numbers up to...*checks* 18446744073709551615.
Anyone want it? :p
-
Originally posted by WMCoolmon
Just for fun, I wrote a program that will calculate all prime numbers up to...*checks* 18446744073709551615.
Anyone want it? :p
You need help.
;)
-
Maybe I'm missing something, (which is entirely possible, seeing as my brain takes math the same way a microwave takes a fork), but if numbers are infinite, how can there be a highest prime number?
-
Originally posted by Ford Prefect
Maybe I'm missing something, (which is entirely possible, seeing as my brain takes math the same way a microwave takes a fork), but if numbers are infinite, how can there be a highest prime number?
Originally posted by Col. Fishguts
There is no biggest prime number.
The set of primes is infinite, which was shown by Euclid in of the most elegant pieces of pure mathematical reasoning.
-
Yeah I saw that, but why did we need elegant mathematical reasoning to figure out that there's no largest prime number? Doesn't it just sort of... stand to reason?
-
Originally posted by Ford Prefect
but if numbers are infinite, how can there be a highest prime number?
Because, prime number can only be divided by themselves and 1, and at some point it.. It cannot... Be done?
Why did I try to answer that? I have no idea!
-
Originally posted by Primus
You need help.
;)
It inflates my ego to only have to compile something three times before all the bugs are worked out of it. :p
#define UINT64_MAX 18446744073709551615
#include
#include
#include
std::vector Primes;
bool nonstoploop()
{
unsigned __int64 x = 2;
unsigned __int64 y = 0;
bool Prime;
while(x != UINT64_MAX)
{
Prime = true;
for(y = 2; y < x; y++)
{
if(x % y == 0)
{
Prime = false;
break;
}
}
if(Prime)
Primes.push_back(x);
x++;
}
return true;
}
bool stoppableloop()
{
unsigned __int64 x = 2;
unsigned __int64 y = 0;
bool Prime;
int k;
while(x != UINT64_MAX)
{
Prime = true;
x++;
for(y = 2; y < x; y++)
{
if(x % y == 0)
{
Prime = false;
break;
}
}
if(Prime)
Primes.push_back(x);
k = getch();
if(k == 'q')
return false;
}
return true;
}
int main(int argc, char** argv)
{
bool wasted;
if(argc > 1)
wasted = stoppableloop();
else
wasted = nonstoploop();
size_t num = Primes.size(); //Hopefully this is big enough
for(unsigned __int64 i = 0; i < num; i++)
{
printf("Prime number: %d", Primes[i]);
}
if(wasted)
printf("Congratulations! You just wasted your time finding the highest prime number up to %d", UINT64_MAX);
else
printf("You wimped out. Clearly you aren't (wo)man enough to go all the way.");
}
-
Because proof of something is better than belief in something? :p
-
Furthermore, why did you answer if you don't have a meaningful answer? I have no idea. Spammer.
To answer your question, Ford, yes it does... asuming that you know that there is no largest number. Without that knowledge, the assumption is groundless. My field isn't the history mathematics but I would imagine that 'infinity' wasn't always a concept that humanity was familiar with.
-
Given that they weren't always familiar with zero, that's a fairly good guess Moonsword.
-
OMG.
I thought I'd escaped it. Friend of mine is seeing how high his program will go in calculating the Prime numbers...
I'm surrounded by the fools... :(
This same friend of mine, at one point had pi memorized upto 100 decimal places. I only got upto 25 or something. Man was I bored back then...
btw.
#define Pi 3.141592654f
Is incorrect, its rounded up. If thats what the f means then meh.
From memory:
3.14159265358979 ...meh the rest.
Pi used to be on an exceptionally large poster going around the class room wall near the roof. When bored, I just sat there memorizing pi, till I discovered that there were better things to look at, such as the developing young woman around me... :)