![]() |
|
|
#1739 |
|
"Forget I exist"
Jul 2009
Dumbassville
203008 Posts |
Still baffled by the error in your first code Pi ? If so I can tell you it's simple, in fact I over thought it.
|
|
|
|
|
|
#1740 | |
|
"Forget I exist"
Jul 2009
Dumbassville
838410 Posts |
Quote:
Last fiddled with by science_man_88 on 2010-11-28 at 00:57 |
|
|
|
|
|
|
#1741 |
|
May 2010
Prime hunting commission.
32208 Posts |
I already did; I was merely inattentive. Don't flatter yourself.
Last fiddled with by 3.14159 on 2010-11-28 at 01:15 |
|
|
|
|
|
#1742 |
|
"Forget I exist"
Jul 2009
Dumbassville
26·131 Posts |
Sorry I just see no reason for me to correct you if I don't,as you have more ability than me.
Last fiddled with by science_man_88 on 2010-11-28 at 01:20 |
|
|
|
|
|
#1743 |
|
May 2010
Prime hunting commission.
24×3×5×7 Posts |
I have an idea, in order to search for those k's with no primes. I'll do an amateur sieve, but it keeps primes out instead.
Last fiddled with by 3.14159 on 2010-11-28 at 02:13 |
|
|
|
|
|
#1744 |
|
Aug 2006
3×1,993 Posts |
Back to the original topic for a moment:
I've been doing some work over at Rosetta Code, adding examples of simple tasks in Pari/GP. Here's the link: http://rosettacode.org/wiki/Category:PARI/GP You may find this useful if you're trying to do something simple in Pari that seems like it should be easy, but you just don't know the commands or can't think of a good way to do it. I found it very instructive to write these examples; you may be able to either learn from it or teach me (feel free to post here, PM me, or simply change one of the RC entries). I have 132 tasks solved at the moment,* ranging from simple ones like language basics (loops, arithmetic) and primality by trial division to complicated ones like root finding. * Actually, I imagine that a few of those were written by others, but I certainly wrote the bulk. You can look at the edit history if you're interested in authorship (but why would you be?). Last fiddled with by CRGreathouse on 2010-11-28 at 04:09 |
|
|
|
|
|
#1745 | |
|
"Forget I exist"
Jul 2009
Dumbassville
203008 Posts |
Quote:
that I own to help system() is a function just can't remember the coding for some of the things on here and some of these are talked of in number freak maybe that can help lol. |
|
|
|
|
|
|
#1746 |
|
"Forget I exist"
Jul 2009
Dumbassville
203008 Posts |
Also stack is on that list. I've actually wanted to for a long time try to make pari resemble asm lol.
Last fiddled with by science_man_88 on 2010-11-28 at 12:51 |
|
|
|
|
|
#1747 |
|
"Forget I exist"
Jul 2009
Dumbassville
26·131 Posts |
Stack needs:
vector to act as placeholders; concat() that acts like push and throws errors if something like concat(data,c) in the mix; pop instruction to take the last in as the first out. In other words a variable like the stack pointer in asm to point at the data to be popped off. |
|
|
|
|
|
#1748 |
|
"Forget I exist"
Jul 2009
Dumbassville
26·131 Posts |
okay a little trouble:
Code:
stack= [0] push(n)=concat(stack,n) pop(n)=stack[#stack]=n; pop I coded wrong and even correctly coded it doesn't work. |
|
|
|
|
|
#1749 |
|
"Forget I exist"
Jul 2009
Dumbassville
100000110000002 Posts |
Found around the push error.
Now if only I can get pop to work. |
|
|
|
![]() |
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 |