mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   PARI/GP (https://www.mersenneforum.org/forumdisplay.php?f=155)
-   -   PARI's commands (https://www.mersenneforum.org/showthread.php?t=13636)

CRGreathouse 2010-11-28 15:04

I wrote it up here for you:
[url]http://rosettacode.org/wiki/Stack#PARI.2FGP[/url]

science_man_88 2010-11-28 15:08

[QUOTE=CRGreathouse;239039]I wrote it up here for you:
[url]http://rosettacode.org/wiki/Stack#PARI.2FGP[/url][/QUOTE]

it should be noted in [url]http://rosettacode.org/wiki/Reports:Tasks_not_implemented_in_PARI/GP[/url]

as done I think.

science_man_88 2010-11-28 15:12

[url]http://rosettacode.org/wiki/Go_Fish[/url]

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 2010-11-28 15:19

oh and I've built something near this before:

[url]http://rosettacode.org/wiki/Rate_counter[/url]

just need a loop a timer variable to collect gettime() data and a counter variable to count the repetitions of something every x milliseconds.

CRGreathouse 2010-11-28 15:34

[QUOTE=science_man_88;239040]it should be noted in [url]http://rosettacode.org/wiki/Reports:Tasks_not_implemented_in_PARI/GP[/url]

as done I think.[/QUOTE]

That list automatically updates, so it should not list Stack anymore.

CRGreathouse 2010-11-28 15:36

[QUOTE=science_man_88;239042]oh and I've built something near this before:

[url]http://rosettacode.org/wiki/Rate_counter[/url]

just need a loop a timer variable to collect gettime() data and a counter variable to count the repetitions of something every x milliseconds.[/QUOTE]

You write up that version and I'll add a 2.4.3 version using alarm().

science_man_88 2010-11-28 15:42

[QUOTE=CRGreathouse;239045]You write up that version and I'll add a 2.4.3 version using alarm().[/QUOTE][url]http://www.mersenneforum.org/clear.gif[/url]

[CODE][COLOR="Red"]a=0;b=0;[/COLOR]c=0;for(n=1,20000000,[COLOR="red"]a=a+gettime();if(a>60000,print(b);a=0;b=0)[/COLOR];c=c+n;[COLOR="red"]b=b+1;a=a+gettime();if(a>60000,print(b);a=0;b=0)[/COLOR])[/CODE]

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()));
[/CODE]
might be simpler, but acts more of a code tester.

CRGreathouse 2010-11-28 15:49

Why do you use the constant 20000000 here?

science_man_88 2010-11-28 15:50

[QUOTE=CRGreathouse;239047]Why do you use the constant 20000000 here?[/QUOTE]

just picked a number I thought would take a while to test with.

science_man_88 2010-11-28 15:51

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

[url]http://rosettacode.org/wiki/Create_a_file[/url]

science_man_88 2010-11-28 15:54

funny I brought up testing a code:

[url]http://rosettacode.org/wiki/Test_a_function[/url] this fits this one as well. Though why not just type the function lol.


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

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