[ 3 / biz / cgl / ck / diy / fa / ic / jp / lit / sci / vr / vt ] [ index / top / reports ] [ become a patron ] [ status ]
2023-11: Warosu is now out of extended maintenance.

/sci/ - Science & Math


View post   

File: 16 KB, 331x299, ChloeMoretz-thinks4.jpg [View same] [iqdb] [saucenao] [google]
[ERROR] No.3647036 [Reply] [Original]

Hi /sci/

I just calculated all prime numbers up to 13000000 with a program written by myself in Ada.

If you are interested here's the link:

http://www.megaupload.com/?d=GM39NT2Z

just sayin..

>> No.3647040

Well done

>> No.3647042
File: 56 KB, 576x432, Y4AJAVDIKV6UVFTWDGTFWOTA6PDZW5CE.jpg [View same] [iqdb] [saucenao] [google]
[ERROR]

http://projecteuler.net/index.php?section=problems

well done you reached about problem 7.

Would you like a medal?


seriously though noone wants your worthless program, i could make one in around 5 minutes,

>> No.3647055
File: 13 KB, 208x199, 1311497054659.jpg [View same] [iqdb] [saucenao] [google]
[ERROR]

>>3647042

it's not a link to the program, but to a txt list of numbers.

>> No.3647065

>>3647055

today, this man made a valuable contribution to the scientific community,

>> No.3647067
File: 44 KB, 477x358, 1308471958543.jpg [View same] [iqdb] [saucenao] [google]
[ERROR]

>>3647042

Also, that's wrong according to my list.

The 10001th prime is 104729.

>> No.3647072

>>3647055

And? Are you fucking 10 years old? Any old retard can make a program generate prime numbers, want me to make one right now and generate 10 more numbers than you did?

>> No.3647077
File: 36 KB, 366x334, 1313842960631.jpg [View same] [iqdb] [saucenao] [google]
[ERROR]

>>3647072

Why not?

Do it.

>> No.3647083

>ada
lol'd thanks OP

>> No.3647090 [DELETED] 

looks something like:

new Array=p;
p[0]=2;
i=2;
j=0;
k=0;
while (i<end) //all the numbers you wanna check
{
if (mod(i/p[j]) === 0)
{
i++
}
else if (mod(i/p[j]) !=== 0)
{
j++
}
else if (2j>i)
{
j=2;
k++;
p[k]=i;
i++;
}
}

>mfw never taken any computer science...

>> No.3647093 [DELETED] 
File: 70 KB, 453x594, Sarah+Palin+Sarah+Palin+Addresses+Real+Estate+u7_gl7I7VY5l.jpg [View same] [iqdb] [saucenao] [google]
[ERROR]

>yfw OP is literally 12

>> No.3647096
File: 26 KB, 447x364, 1312538042610.jpg [View same] [iqdb] [saucenao] [google]
[ERROR]

>>3647036
how's high school going for you OP?

>> No.3647098 [DELETED] 

>>3647036
>I just calculated all prime numbers up to 13000000 with a program written by myself in Ada..
>a program written by myself in Ada.
>in Ada.
>Ada
>2011
ISHYGDDT

>> No.3647099

primesFromToA a b = (if a<3 then [2] else [])
++ [i | i <- [o,o+2..b], ar ! i]
where
o = max (if even a then a+1 else a) 3
r = floor.sqrt.fromInteger $ b+1
ar = accumArray (\a b-> False) True (o,b)
[(i,()) | p <- [3,5..r]
, let q = p*p
s = 2*p
(n,x) = quotRem (o - q) s
q' = if o <= q then q
else q + (n + signum x)*s
, i <- [q',q'+s..b] ]

>> No.3647105

Table[Prime[n],{n,1000000}]

Look OP, I wrote a program in mathematica to compute the first million primes.

>> No.3647106

Wrote a for loop and used fermat's little theorem. Derp

>> No.3647118

>>3647065 and @everyone like him
Oh come on, guys. It may not be a contribution to the scientific or mathematical community, but it is a step in the direction learning how to make contributions.

>> No.3647120

primes = []
l = True
for a in range(13000000):
for b in range(0,a):
if a/b == 1:
l = False
break
if l not false:
primes.append(a)
l = True

>> No.3647124
File: 75 KB, 564x575, 1309724053307.jpg [View same] [iqdb] [saucenao] [google]
[ERROR]

>>3647098

I'm kinda hipster, problem?

>>3647096
>>3647093

Not sure, but something tell me here's a samefag:
>>3647072

btw.. why don't you make that program for real instead of talking?

I'm waiting for that list up to 130mil.

Come on, do it faggot.

>> No.3647130

>>3647124
thats not even hipster thats just retarded
but anyway i am not a code monkey and i dont give a shit about CS .
if you enjoy your shitty language,what can i say

>> No.3647146
File: 51 KB, 640x427, catfacer.jpg [View same] [iqdb] [saucenao] [google]
[ERROR]

>>3647130

>retarded
>shitty

Is there a serious reason for that statement or your opinion is just based on popularity?

>> No.3647161

>>3647124
see
http://dis.4chan.org/read/sci/1312843739

>> No.3647183

>1 as a prime number

>> No.3647191
File: 136 KB, 364x418, 1313581071726.jpg [View same] [iqdb] [saucenao] [google]
[ERROR]

>>3647161

I'm not a mathematician.

Btw I think that if you master mathematics you master anything involving logic.

>> No.3647192

>>3647093
I'm actually 11.

>> No.3647197 [DELETED] 
File: 13 KB, 300x300, facepalm.jpg [View same] [iqdb] [saucenao] [google]
[ERROR]

>>3647192

I'm 11 and wtf is this witchcraft?

>> No.3647207 [DELETED] 

shut up you piece of shit

>> No.3647206

> btw.. why don't you make that program for real instead of talking?

because it would prove god damn nothing? There are multiple established algorithms for calculating primes. All you have to do is look one up and pretty much copy paste.

>> No.3647215

>>3647206
You're just mad cause you don't have my leet skills.

>> No.3647221

>>3647206

>There are multiple established algorithms for calculating primes.

Give me one that isn't a sieve variant.

>> No.3647225

>>3647183

Goodbye, fundamental theorem...

>> No.3647230

>>3647192

ok I replied to it (it was not me) and now my post was deleted.

Jokes are nice, but deleting my comment?.. fuck you mods.

>>3647206

well, I did not make it just for the numbers, but to make a valid algorithm myself starting from the naivest one to some more efficient.
I will publish the code if someone is interested.

Btw, you said that you could actually MAKE the program, than I just replied.
It's easy to talk and make provocations, less easy to make things actually, even if naive.

Anyway, it's possible to calculate all the primes you want, it's just a question of time and computer speed.

>> No.3647231

>>3647221
Loop and check each number

>> No.3647238

shut up you peice of shit

>> No.3647241

>>3647215

He's not me.

Just saying.


Have fun, you fucking retarded mod.

>> No.3647244

>>3647238
>peice

>> No.3647246

>>3647230

then*

>> No.3647256

>>3647090
>else if (mod(i/p[j]) !=== 0)

What language is this? Why's it have so many equal signs?

>> No.3647269

>>3647042
Hey that's pretty cool, I might link that to people who are trying to learn programming(as practice)

>> No.3647293

Here, have some primes:
http://www.megaupload.com/?d=10SAN3IR