mersenneforum.org  

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

Reply
 
Thread Tools
Old 2010-12-01, 23:59   #1882
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

203008 Posts
Default

Quote:
Originally Posted by 3.14159 View Post
I'm guessing the last one is C?
CRG there's a period breaking the name is that normal ?
science_man_88 is offline   Reply With Quote
Old 2010-12-02, 00:00   #1883
3.14159
 
3.14159's Avatar
 
May 2010
Prime hunting commission.

24·3·5·7 Posts
Default

Quote:
Originally Posted by science_man_88 View Post
http://rosettacode.org/wiki/Reports:...ted_in_PARI/GP

Is what we've been trying to clear Pi.
I think PARI/GP's too weak for those tasks.
3.14159 is offline   Reply With Quote
Old 2010-12-02, 00:04   #1884
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

26×131 Posts
Default

Quote:
Originally Posted by 3.14159 View Post
I think PARI/GP's too weak for those tasks.
I tried a bunch I've cleared 5 with help and 2 CRG has pretty much rewritten they aren't impossible lol should i point to the ones I've tried ? this would include part of a RLE script,guess number/with feedback ( just saw a message about how long the code is per line I must format it "properly",Pascals triangle, the "Pascals triangle/ puzzle", a lousy rate counter, I've tried loop N + 1/2, and asked about why stack was on the list still and brought up some I think we can finish like the tower of Hanoi ( involves Mersenne numbers for fastest solve).

Last fiddled with by science_man_88 on 2010-12-02 at 00:10
science_man_88 is offline   Reply With Quote
Old 2010-12-02, 00:09   #1885
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

135338 Posts
Default

Quote:
Originally Posted by 3.14159 View Post
And, those numbers would be too large to even handle, let alone make some computations with, and they're not in order from least to greatest.
Ding ding! Pi wins.
CRGreathouse is offline   Reply With Quote
Old 2010-12-02, 00:11   #1886
3.14159
 
3.14159's Avatar
 
May 2010
Prime hunting commission.

110100100002 Posts
Default

Quote:
Originally Posted by science_man_88 View Post
I tried a bunch I've cleared 5 with help and 2 CRG has pretty much rewritten they aren't impossible lol should i point to the ones I've tried ? this would include part of a RLE script,guess number/with feedback ( just saw a message about how long the code is per line I must format it "properly",Pascals triangle, the "Pascals triangle/ puzzle", a lousy rate counter, I've tried loop N + 1/2, and asked about why stack was on the list still and brought up some I think we can finish like the tower of Hanoi ( involves Mersenne numbers for fastest solve).
I think that another one that may be partially possible is the challenge of creating a script that would evaluate arithmetic expressions, such as "(5^2 + 7) + 41", without using the built-in calculator.

How the lottery should be;

1. 100 numbers are randomly given to you.
2. Arrange these numbers in a certain order (not given)
3. Winner gets $(10^10).

Last fiddled with by 3.14159 on 2010-12-02 at 00:18
3.14159 is offline   Reply With Quote
Old 2010-12-02, 00:14   #1887
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

26·131 Posts
Default

Quote:
Originally Posted by 3.14159 View Post
I think that another one that may be partially possible is the challenge of creating a script that would evaluate arithmetic expressions, such as "(5^2 + 7) + 41", without using the built-in calculator.
Code:
evalscript(script) = eval(script)
? or
Code:
evalscript(script) = eval(Vec(Str(script)))
science_man_88 is offline   Reply With Quote
Old 2010-12-02, 00:15   #1888
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

3·1,993 Posts
Default

Quote:
Originally Posted by 3.14159 View Post
O rly?
Quote:
Originally Posted by science_man_88 View Post
CRG there's a period breaking the name is that normal ?
Ah, good for you for noticing!

No, periods aren't allowed in names. What's going on here is that I define pi as a variable, say

Code:
pi=["Kevin", "3.14159", 42, 0, 0];
then I define the function

Code:
x.age={
  if (type(x) != "t_VEC" || #x != 5, error("Type error"));
  x[3]
};
so that pi.age returns pi's age. (Forgive the Hitchhiker's Guide to the Galaxy reference; I don't know his real age.)
CRGreathouse is offline   Reply With Quote
Old 2010-12-02, 00:19   #1889
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

3·1,993 Posts
Default

Quote:
Originally Posted by 3.14159 View Post
I think that another one that may be partially possible is the challenge of creating a script that would evaluate arithmetic expressions, such as "(5^2 + 7) + 41", without using the built-in calculator.
Quote:
Originally Posted by science_man_88 View Post
Code:
evalscript(script) = eval(script)
? or
Code:
evalscript(script) = eval(Vec(Str(script)))
Not allowed, see the problem description.
CRGreathouse is offline   Reply With Quote
Old 2010-12-02, 00:19   #1890
3.14159
 
3.14159's Avatar
 
May 2010
Prime hunting commission.

24×3×5×7 Posts
Default

Quote:
Originally Posted by CRGreathouse View Post
Ah, good for you for noticing!

No, periods aren't allowed in names. What's going on here is that I define pi as a variable, say

Code:
pi=["Kevin", "3.14159", 42, 0, 0];
then I define the function

Code:
x.age={
  if (type(x) != "t_VEC" || #x != 5, error("Type error"));
  x[3]
};
so that pi.age returns pi's age. (Forgive the Hitchhiker's Guide to the Galaxy reference; I don't know his real age.)
I'm 42 * 0.380952380952380952380952381...

Last fiddled with by 3.14159 on 2010-12-02 at 00:20
3.14159 is offline   Reply With Quote
Old 2010-12-02, 00:23   #1891
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

3·1,993 Posts
Default

Quote:
Originally Posted by 3.14159 View Post
I'm 42 * 0.380952380952380952380952381...
Wow, that's a lot of decimal places. Can we assume you were born at 7:19:00.00000000000000000006 PM, then?


Actually I learned something from my pi.age example: I had thought that member functions (somehow) returned lvalues, but it looks like they just give ordinary rvalues. As a result you can't actually do pi.age++.
CRGreathouse is offline   Reply With Quote
Old 2010-12-02, 00:24   #1892
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

26·131 Posts
Default

you know how you can load the file on runtime with the functions ?

can you do the same but call a function on runtime ? if so

Create a two-dimensional array at runtime is doable with that just make a useless function that creates the array.
science_man_88 is offline   Reply With Quote
Reply



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 22:56.


Fri Aug 6 22:56:11 UTC 2021 up 14 days, 17:25, 1 user, load averages: 4.39, 4.22, 4.01

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.