Page 2344 of 9954

Re: The You Game!

Posted: Thu Jan 27, 2011 7:07 pm
by DesLife
< just made a program on Maple that calculates the number of prime numbers between 1 and 1000000000. < wonders how long it'll take ahahah. (< has already done that between 1 and 1000000, and if < recalls correctly, 7% of those numbers are prime numbers, that's quite a lot)

Re: The You Game!

Posted: Thu Jan 27, 2011 7:40 pm
by spiraldoor
<’s favourite prime number is 5

Re: The You Game!

Posted: Thu Jan 27, 2011 7:43 pm
by MLII
< says 5 is an awesome number

< says he was a bit of a gay stitchpunk though

Re: The You Game!

Posted: Thu Jan 27, 2011 7:47 pm
by Danone
< prefer the number 4 :P
< re-saw star wars

Re: The You Game!

Posted: Thu Jan 27, 2011 8:00 pm
by Puruun
< is looking forward to tomorrow~

Re: The You Game!

Posted: Thu Jan 27, 2011 8:11 pm
by Matyuv
DesLife wrote:< just made a program on Maple that calculates the number of prime numbers between 1 and 1000000000.
< coded that up too.
< wonders how long it'll take to execute.

Re: The You Game!

Posted: Thu Jan 27, 2011 8:13 pm
by DesLife
On what software ? It's been over an hour now. < expects it to take days, since it's an old version of Maple. Remember <'s Euler stuff program ? :mrgreen:

Re: The You Game!

Posted: Thu Jan 27, 2011 8:24 pm
by Matyuv
DesLife wrote:On what software ?
MS Visual Studio 2008 (C++)

From 1 to 1 million took 0.59secs on <'s computer
From 1 to 1 billion will take ages though.

Re: The You Game!

Posted: Thu Jan 27, 2011 8:44 pm
by DesLife
... 0.59S ??! It took 18.3s on <'s computer...

Re: The You Game!

Posted: Thu Jan 27, 2011 8:52 pm
by Matyuv
Hmmm that's strange. What's your processor and what algorithm are you using?

Re: The You Game!

Posted: Thu Jan 27, 2011 9:00 pm
by DesLife
m:=0: for i from 1 to 1000000 do if isprime(i)=true then m:=m+1: fi: od: m;
Proc : Intel(R) Core(TM)2 Duo CPU T6500, 2.10GHz

< absolutely doesn't know anything about processors ahahah.

Oh, and <'s using Maple 5.1, which is old. Maple 7, which we use at school, is much faster.

Re: The You Game!

Posted: Thu Jan 27, 2011 9:14 pm
by Matyuv
That's a laptop processor right?
Mine's Intel Core i5 750 @ 2.67GHz, but I doubt it's 30 times faster than yours... must be Maple (then again I doubt their isprime() function is less efficient than the one I wrote)

< doesn't know shit about processors or hardware in general too actually lel

Re: The You Game!

Posted: Thu Jan 27, 2011 9:19 pm
by DesLife
Yup, right. What's your function ?

Re: The You Game!

Posted: Thu Jan 27, 2011 9:34 pm
by Matyuv
It was for some ProjectEuler problem originally.

Code: Select all

bool is_prime(int n)
{
	int start = 5;
	if (n==1)   return false;
	if (n<4)    return true;
	if (n%2==0) return false;
	if (n<9)    return true;
	if (n%3==0) return false;
	while (start <= sqrt((double)n))
	{
		if (n%start==0) return false;
		if (n%(start+2)==0) return false;
		start += 6;
	}
	return true;
}

Re: The You Game!

Posted: Thu Jan 27, 2011 10:15 pm
by MLII
DesLife wrote: Maple 7, which we use at school, is much faster.

School? :0

< wonders how old Des is

Re: The You Game!

Posted: Thu Jan 27, 2011 10:28 pm
by Serza5
< knows Dessy is 25 and a maths teacher :)

Re: The You Game!

Posted: Thu Jan 27, 2011 10:40 pm
by Julia_Patti
<draws a sig for Candish (which won't be in Ambush thread, because it was discussed before and therefore not a surprise).

Re: The You Game!

Posted: Thu Jan 27, 2011 10:41 pm
by Matyuv
< has to study for the programming exam which I want to retake tomorrow but it's so boring...

Re: The You Game!

Posted: Fri Jan 28, 2011 12:40 am
by Julia_Patti
<...already waits for Candy's reaction :D
<has finally learned how to animate fully in GIMP. Phew!..

Re: The You Game!

Posted: Fri Jan 28, 2011 10:04 am
by Matyuv
< wanted to retake an exam today but < overslept :roll: