Questions tagged [pari-gp]

Questions about the computer algebra system PARI/GP, including questions about the GP scripting language and the gp interactive shell. Please use the tag [pari] for the PARI C library.

The description in the tag exerpt is a direct quotation from the PARI/GP Development Headquarters, taken on Apr. 5, 2013. This tag is intended for questions about the computer algebra system PARI/GP, including questions about the GP scripting language and the gp interactive shell. See the separate tag for the PARI C library.

114 questions
2
votes
1 answer

PARI:similar function like Integer.parseInt()

I want to convert the text hello to ascii decimal in PARI/GP. After that I will concatenate the values. I initialize a Vecsmall(hello), after that I run a loop to concatenate the ascii decimal values, I want to use this concatenated value to * by…
user3820292
  • 310
  • 3
  • 19
2
votes
1 answer

How do I configure gp to allow resumption of the code after I interrupted with Ctrl-C?

I have a Linux PC (Ubuntu) where I installed PARI/GP from the command line (when you type gp in a shell, it says the program is not there but gives you a command you can use to get it all installed), and then I have a Windows machine where I…
Jeppe Stig Nielsen
  • 60,409
  • 11
  • 110
  • 181
2
votes
1 answer

Is there an algorithm known for power towers modulo a number managing all cases?

I would like to have an implementation in PARI/GP for the calculation of a_1 ^ a_2 ^ ... ^ a_n (mod m) which manages all cases, especially the cases where high powers appear in the phi-chain. Does anyone know such an implementation ?
Peter
  • 214
  • 1
  • 10
1
vote
3 answers

Is There a Way to Rationalize a Decimal in Pari/GP?

I'm looking for an automated way to turn a decimal value into a fraction in the PARI/GP calculator (gp). For example, I want to turn 0.759765625 into 389/512. I know I can do this manually by typing in '759765625/10^9', but I'd like an easier way,…
Rick Regan
  • 3,407
  • 22
  • 28
1
vote
1 answer

Binary splitting algorithm needed for nested hypergeometric-type rational sums

There are some good sources on-line to implement fast summation using binary splitting techniques. For example, Ch. 20, Jörg Arndt Book, (2004), Cheng et al. (2007) and papers from Haible and Papanikolaou (1997) and distributed with the CLN library…
Jorge Zuniga
  • 121
  • 4
1
vote
1 answer

how to get the count of a number in a List PARI/GP

is there a method to get the count of a given number in a List? I have a List for which I want to verify, that no number is more than x-times in it.
Lottn Leon
  • 13
  • 2
1
vote
2 answers

Using GCD with a large set of numbers

I am using PARI/GP which is a mathematics program with some helpful functionality for number theory, especially because it supports very large integers out of the box. For a previous C++ project I had to use a library called BigInt. At the moment,…
1
vote
1 answer

Creating graphs using code from Pari-GP, but using Sage's graphing tools

everyone! I know this is probably a dumb question, but I'm having a lot of trouble with Sage, and it's frustrating the hell out of me. To give a bit of an explanation, I code entirely in pari-gp. I don't have a single problem with my code in…
Richard Diagram
  • 209
  • 1
  • 7
1
vote
1 answer

Integral basis nf.zk versus nfbasis in Pari GP

I have been using the database of lmfdb.org to find the integral basis of a number field. Now, I want to utilize PARI/GP in multiplying algebraic integers. However, I have encountered a problem. PARI/GP uses the integral basis "nf.zk" in its…
Butterfly
  • 25
  • 3
1
vote
2 answers

locally setting series precision -- pari-gp

everyone. This is another quick question about pari-gp. I've written my main file such that two different functions work better if \ps 100 or \ps 36; and so I want to specify to some functions, before running, so that locally we can say \ps 100 or…
Richard Diagram
  • 209
  • 1
  • 7
1
vote
1 answer

Getting the constant portion of an expression in Pari-gp

This is probably a pretty stupid question--but I can't seem to find a relevant explanation in the pari-gp literature. I'm looking for a function in the library that takes a polynomial, or a series, or a constant, and spits out the constant portion…
Richard Diagram
  • 209
  • 1
  • 7
1
vote
2 answers

Creating an initialization file in pari-gp

This question is definitely a stupid question. But, coming from C; I'm having trouble adding header files or "an initialization" file to my pari-gp code. This is to mean; I have a 1hr compile of code to make one vector; and I can use that vector…
Richard Diagram
  • 209
  • 1
  • 7
1
vote
1 answer

Passing values outside user's defined function in PARI GP

I want to write a function SWAP to swap 2 integers a and b in PARI. This function does not return any values but I want the variables outside the function to store the new values. I don't know how to fix this. This is my function: swap(a,b) = { t=a;…
1
vote
1 answer

How can i draw graph of Elliptic Curve mod p by using pari-gp?

Suppose E:y^2=x^3+Ax+B mod p, I have two questions? how can I draw the graph of E with pari-gp. how can I get the list of all points over the E. thank you for all.
abrahamxyz
  • 11
  • 2
1
vote
1 answer

Looping over specific values in PARI/GP

I have a large collection of vectors, each of the form [a,b,c,d]. For each vector, I want to return the result [a,b,c,d,a+b^2+c^3+d^4]. What would be the best way of doing this? For example, say my vectors are V = [ [1,2,3,4], [5,6,7,8], [9, 10, 11,…
Mystery_Jay
  • 161
  • 5