mersenneforum.org  

Go Back   mersenneforum.org > Math Stuff > Computer Science & Computational Number Theory > PARI/GP

Reply
 
Thread Tools
Old 2010-11-28, 15:04   #1750
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

3×1,993 Posts
Default

I wrote it up here for you:
http://rosettacode.org/wiki/Stack#PARI.2FGP
CRGreathouse is offline   Reply With Quote
Old 2010-11-28, 15:08   #1751
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

26×131 Posts
Default

Quote:
Originally Posted by CRGreathouse View Post
it should be noted in http://rosettacode.org/wiki/Reports:...ted_in_PARI/GP

as done I think.
science_man_88 is offline   Reply With Quote
Old 2010-11-28, 15:12   #1752
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

26·131 Posts
Default

http://rosettacode.org/wiki/Go_Fish

shouldn't be too hard either:

The hard part is making the string question eliminate things like numbers.

2 arrays:

both randomly filled then a question bot like I tried in ms-dos before i think.
science_man_88 is offline   Reply With Quote
Old 2010-11-28, 15:19   #1753
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

26×131 Posts
Default

oh and I've built something near this before:

http://rosettacode.org/wiki/Rate_counter

just need a loop a timer variable to collect gettime() data and a counter variable to count the repetitions of something every x milliseconds.
science_man_88 is offline   Reply With Quote
Old 2010-11-28, 15:34   #1754
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

3·1,993 Posts
Default

Quote:
Originally Posted by science_man_88 View Post
it should be noted in http://rosettacode.org/wiki/Reports:...ted_in_PARI/GP

as done I think.
That list automatically updates, so it should not list Stack anymore.
CRGreathouse is offline   Reply With Quote
Old 2010-11-28, 15:36   #1755
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

135338 Posts
Default

Quote:
Originally Posted by science_man_88 View Post
oh and I've built something near this before:

http://rosettacode.org/wiki/Rate_counter

just need a loop a timer variable to collect gettime() data and a counter variable to count the repetitions of something every x milliseconds.
You write up that version and I'll add a 2.4.3 version using alarm().
CRGreathouse is offline   Reply With Quote
Old 2010-11-28, 15:42   #1756
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

26×131 Posts
Default

Quote:
Originally Posted by CRGreathouse View Post
You write up that version and I'll add a 2.4.3 version using alarm().
http://www.mersenneforum.org/clear.gif

Code:
a=0;b=0;c=0;for(n=1,20000000,a=a+gettime();if(a>60000,print(b);a=0;b=0);c=c+n;b=b+1;a=a+gettime();if(a>60000,print(b);a=0;b=0))
is the more complicated version, the less complicated:

Code:
for(1,number_of_test_to_perform,gettime();c=0;for(n=1,20000000,c=c+n);return(20000000/gettime()));
might be simpler, but acts more of a code tester.

Last fiddled with by science_man_88 on 2010-11-28 at 15:42
science_man_88 is offline   Reply With Quote
Old 2010-11-28, 15:49   #1757
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

3·1,993 Posts
Default

Why do you use the constant 20000000 here?
CRGreathouse is offline   Reply With Quote
Old 2010-11-28, 15:50   #1758
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

26×131 Posts
Default

Quote:
Originally Posted by CRGreathouse View Post
Why do you use the constant 20000000 here?
just picked a number I thought would take a while to test with.
science_man_88 is offline   Reply With Quote
Old 2010-11-28, 15:51   #1759
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

26×131 Posts
Default

the list hasn't been updated in a while lol:

http://rosettacode.org/wiki/Create_a_file
science_man_88 is offline   Reply With Quote
Old 2010-11-28, 15:54   #1760
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

100000110000002 Posts
Default

funny I brought up testing a code:

http://rosettacode.org/wiki/Test_a_function this fits this one as well. Though why not just type the function lol.
science_man_88 is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why do I sometimes see all the <> formatting commands when I quote or edit? cheesehead Forum Feedback 3 2013-05-25 12:56
Passing commands to PARI on Windows James Heinrich Software 2 2012-05-13 19:19
Ubiquity commands Mini-Geek Aliquot Sequences 1 2009-09-22 19:33
64-bit Pari? CRGreathouse Software 2 2009-03-13 04:22
Are these commands correct? jasong Linux 2 2007-10-18 23:40

All times are UTC. The time now is 23:04.


Fri Aug 6 23:04:40 UTC 2021 up 14 days, 17:33, 1 user, load averages: 3.50, 3.80, 3.90

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.