![]() |
|
|
#1750 |
|
Aug 2006
3·1,993 Posts |
I wrote it up here for you:
http://rosettacode.org/wiki/Stack#PARI.2FGP |
|
|
|
|
|
#1751 | |
|
"Forget I exist"
Jul 2009
Dumbassville
26×131 Posts |
Quote:
as done I think. |
|
|
|
|
|
|
#1752 |
|
"Forget I exist"
Jul 2009
Dumbassville
26×131 Posts |
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. |
|
|
|
|
|
#1753 |
|
"Forget I exist"
Jul 2009
Dumbassville
26·131 Posts |
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. |
|
|
|
|
|
#1754 | |
|
Aug 2006
10111010110112 Posts |
Quote:
|
|
|
|
|
|
|
#1755 | |
|
Aug 2006
3·1,993 Posts |
Quote:
|
|
|
|
|
|
|
#1756 | |
|
"Forget I exist"
Jul 2009
Dumbassville
26×131 Posts |
Quote:
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)) Code:
for(1,number_of_test_to_perform,gettime();c=0;for(n=1,20000000,c=c+n);return(20000000/gettime())); Last fiddled with by science_man_88 on 2010-11-28 at 15:42 |
|
|
|
|
|
|
#1757 |
|
Aug 2006
3×1,993 Posts |
Why do you use the constant 20000000 here?
|
|
|
|
|
|
#1758 |
|
"Forget I exist"
Jul 2009
Dumbassville
26·131 Posts |
|
|
|
|
|
|
#1759 |
|
"Forget I exist"
Jul 2009
Dumbassville
26·131 Posts |
|
|
|
|
|
|
#1760 |
|
"Forget I exist"
Jul 2009
Dumbassville
26×131 Posts |
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. |
|
|
|
![]() |
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 |