Category:PARI/GP: Difference between revisions
→Getting PARI/GP: instructions on installing PariDroid |
m →Tutorials: add parallel computation link |
||
Line 203:
*[http://www.math.uiuc.edu/~r-ash/GPTutorial.pdf Tutorial] by Robert B. Ash (20 pp., 2007)
*[http://www.linuxjournal.com/article/1068 The Pari Package On Linux], by Klaus-Peter Nischke (3 pp., 1995)
*[http://users.aims.ac.za/~richard/faq/index.php Pari/GP Tutorial] by Akinola Richard Olatokunbo (now offline
*[https://pari.math.u-bordeaux.fr/Events/PARI2019/talks/parallel.pdf Parallel Computation] by Bill Allombert
*[https://web.archive.org/web/20170324230906/http://users.aims.ac.za/~richard/faq/index.php archived version])
==== Non-English language ====
|
Revision as of 19:59, 11 January 2022
This programming language may be used to instruct a computer to perform a task.
Official website |
---|
Execution method: | Interpreted or compiled |
---|---|
Garbage collected: | Yes |
Parameter passing methods: | By reference, By value |
Type strength: | Weak |
Type checking: | Dynamic |
Lang tag(s): | parigp, c |
See Also: |
PARI/GP is a widely used computer algebra system designed for fast computations in number theory (factorizations, algebraic number theory, elliptic curves...), but also contains a large number of other useful functions to compute with mathematical entities such as matrices, polynomials, power series, algebraic numbers etc., and a lot of transcendental functions.
PARI/GP is composed of two parts: a C library called PARI and an interface, gp, to this library. GP scripts are concise, easy to write, and resemble mathematical language. (Terminology: the scripting language of gp is called GP.)
PARI was written by Henri Cohen and others at Université de Bordeaux and is now maintained by Karim Belabas. gp was originally written by Dominique Bernardi, then maintained and enhanced by Karim Belabas and Ilya Zakharevich, and finally rewritten by Bill Allombert.
Getting PARI/GP
PARI/GP can be used in many different operating systems. This is a reasonably comprehensive list of currently-supported systems; for other systems, please use the mailing lists.
Operating system | Kind | Type of install | Link | How to install |
---|---|---|---|---|
Windows | various | installer (stable or development) | official site | run installer |
XP, Vista, 7, 8, 10 | standalone binaries (stable or development) | official site | run | |
various | standalone binaries (daily) | official site | run | |
Linux | Ubuntu/Debian | package manager | Debian packages | sudo apt-get install pari-gp
|
Fedora | package manager | Fedora packages | sudo dnf install pari-gp
| |
Arch | package manager | Arch packages | sudo pacman -S pari
| |
RHEL/CentOS | package manager | sudo yum install pari-gp
| ||
FreeBSD | package manager | FreeBSD Ports Search | sudo pkg install pari-2.11.3,2
| |
various | package manager | Homebrew formula | brew install pari
| |
various | build from source | official site | Building PARI/GP in Linux | |
macOS | at least El Capitan (10.11) | DMG installer (stable or development) | official site | Open dmg, drag to Applications (note: window may start minimized) |
at least El Capitan (10.11) | standalone binary (stable or development) | official site | run | |
unknown, at least OS X (10.?) | package manager | MacPorts (and portfile) | sudo port install pari
| |
unknown | package manager | Homebrew formula | brew install pari
| |
Android | various | package manager | f-droid | Install via F-Droid client or install APK directly |
various | package manager | Google Play | ||
various | precompiled binary | official site | ||
various | build from source | github | Building and Installing (note: requires Android SDK Tools and Android NDK) | |
various | build from source | official site | Installing PariDroid | |
iOS | iOS 8+ | app | sage-math | Click the "+" in the top-right to start a new program, then click and hold on "Sage" at the top until the "Select Language" dropdown appears, then choose GP. (You can also use the wrapper function pari in a Sage snippet.)
|
online | Chrome, Firefox, Internet Explorer | local Javascript | Emscripten | |
Chrome, Firefox | local Javascript | WebAssembly | ||
Chrome, Firefox, Internet Explorer | client/server | compile online | ||
various | client/server | CoCalc | How to use PARI/GP in the SageMathCloud (SageMathCloud is now CoCalc) |
Coding with PARI
The most common way to use PARI is through the gp calculator, using its own scripting language, GP. But there are other interfaces to PARI beside gp:
- PariGP on EmacsWiki, PariEmacs
- Pari-tty
- pariGUIde
- vim-notebook (see also the author's video on using gp from vim)
- Jupyter kernel
If you want to program with PARI, many languages are supported:
- C: PARI is written in C, so it's very easy to either write your own programs or extend gp using C.
- The gp2c utility converts GP scripts into executable C code.
- For use with the Gnu Mpc library, there is also Pari-Gnump.
- C++: PARI can be used directly in C++. The code is intentionally written in a C++-compatible style.
-fpermissive
is sometimes useful when compiling with g++. - Python:
- SageMath (or SAGE) is a Python-based system that includes GP among others
- pari-python
- cypari/cypari2 is a fork of the GP component of SageMath (see also the voluminous CyPari2 Documentation)
- Perl:
- Common Lisp: Use Pari (CLISP).
- Mathematica: A quick tutorial using MathLink is available.
See also
Resources
General
- Official FAQ
- PARI/GP FAQ
- Ateliers PARI/GP: Conference slides and other resources
- Comparison with Magma, GAP, and Singular
Tutorials
- Official tutorial by The PARI Group (58 pp., 2018)
- Tutorial on Elliptic Curves by Bill Allombert and Karim Belabas (5 pp., 2016)
- Beginning PARI Programming for CSE/MATH 467 by W. Dale Brownawell (7 pp., 2014)
- Class notes including PARI/GP tutorial and sample code by Masha Vlasenko (2013)
- Tutorial by Siman Wong (6 pp., 2009)
- Exploring binary numbers with PARI/GP calculator by Rick Regan (appx. 4 pp., 2009)
- Class notes, parts 12345sieve by Benjamin L. Levitt (41 pp., 2009; now offline?)
- Introduction by Keith Conrad (7 pp., 2008)
- PARI/GP programming for basic cryptography by Minh Van Nguyen (appx. 3 pp., 2008); also appears in an extended version (9 pp., 2008)
- Tutorial by Robert B. Ash (20 pp., 2007)
- The Pari Package On Linux, by Klaus-Peter Nischke (3 pp., 1995)
- Pari/GP Tutorial by Akinola Richard Olatokunbo (now offline)
- Parallel Computation by Bill Allombert
- archived version)
Non-English language
- French tutorials (slides) by Bill Allombert (2017):
- Introduction à PARI/GP (13 pp.)
- Programmation GP (11 pp.)
- Théorie algébrique des nombres (31 pp.)
- Théorie algébrique des nombres avancée (22 pp.)
- Courbes elliptiques sur les corps finis (4 pp.)
- Erste Schritte mit PARI/GP by Lars Fischer (13 pp., 2007; German)
- Pari Gp مع NotPad++ by NoorDeen Rahmani (2020; 2:46; Arabic) -- setting up Notepad++ for syntax highlighting for PARI/GP.
Video tutorials
- Pari/GP Tutorial: Basics by Leandro Junes (2020, 19:04)
- Video demo of RSA in PARI/GP by Maren1955 (2014, 17:39)
- Video tutorials, parts 1 2 3 4 (2011, appx. 20 minutes)
Papers on PARI/GP
- Karim Belabas and Henri Cohen, Modular Forms in Pari/GP, Research in the Mathematical Sciences 5:37 (2018)
- Henri Cohen, Expansions at Cusps and Petersson Products in Pari/GP, Elliptic Integrals, Functions, and Modular Forms in Quantum Field Theory, Nov 2017, Zeuthen, Germany. Springer Wien, Elliptic Integrals, Functions, and Modular Forms in Quantum Field Theory. (2018)
- Karim Belabas and Jean-François Jaulent, The logarithmic class group package in PARI/GP, Mathematical Publications of Besançon, Algebra and Number Theory (2016), pp. 5–18.
- Bill Alombert, A new interpretor for PARI/GP, Journal de Théorie des Nombres de Bordeaux 20:3 (2008), pp. 531–541. (English)
- Paul Zimmermann, The Ups and Downs of PARI/GP in the last 20 years, Explicit Methods in Number Theory, October 15th-19th 2007
- Robert H. Lewis and Michael Wester, Comparison of polynomial-oriented computer algebra systems, ACM SIGSAM Bulletin 33:4 (1999), pp. 5-13.
- Henri Cohen, Computing in algebraic number fields. In P. L. Butzer (ed.) et al., Karl der Grosse und sein Nachwirken. 1200 Jahre Kultur und Wissenschaft in Europa. Band 2: Mathematisches Wissen. Turnhout: Brepols. 505-520 (1998)
Subcategories
This category has the following 3 subcategories, out of 3 total.
@
- PARI/GP Implementations (empty)
- PARI/GP User (12 P)
Pages in category "PARI/GP"
The following 200 pages are in this category, out of 607 total.
(previous page) (next page)P
- Pernicious numbers
- Pi
- Pick random element
- Piprimes
- Pisano period
- Playing cards
- Plot coordinate pairs
- Pointers and references
- Polynomial long division
- Polynomial regression
- Polyspiral
- Population count
- Power set
- Price fraction
- Primality by trial division
- Primality by Wilson's theorem
- Prime conspiracy
- Prime decomposition
- Prime triplets
- Primes: n*2^m+1
- Primorial numbers
- Probabilistic choice
- Program name
- Program termination
- Proper divisors
- Pythagoras tree
- Pythagorean triples
R
- Ramsey's theorem
- Random number generator (device)
- Random number generator (included)
- Random numbers
- Ranking methods
- Rate counter
- Read a file line by line
- Read a specific line from a file
- Read entire file
- Readline interface
- Real constants and functions
- Reduced row echelon form
- Remove duplicate elements
- Rename a file
- Rep-string
- Repeat
- Repeat a string
- Repunit primes
- Return multiple values
- Reverse a string
- Rhonda numbers
- Riordan numbers
- RIPEMD-160
- Rock-paper-scissors
- Roman numerals/Decode
- Roman numerals/Encode
- Roots of a function
- Roots of a quadratic function
- Roots of unity
- Rot-13
- RSA code
- Run as a daemon or service
- Run-length encoding
- Runge-Kutta method
- Runtime evaluation
- Runtime evaluation/In an environment
S
- Safe and Sophie Germain primes
- Scope modifiers
- Search a list
- Self-describing numbers
- Semiprime
- Send an unknown method call
- Sequence of non-squares
- Sequence of primes by trial division
- Sequence of primorial primes
- Set
- Set consolidation
- Set of real numbers
- Set puzzle
- Seven-sided dice from five-sided dice
- SHA-1
- SHA-256
- Shell one-liner
- Short-circuit evaluation
- Show the (decimal) value of a number of 1s appended with a 3, then squared
- Show the epoch
- Sierpinski carpet
- Sierpinski triangle
- Sierpinski triangle/Graphical
- Sieve of Eratosthenes
- Sleep
- Smallest multiple
- Smith numbers
- Sort an array of composite structures
- Sort an integer array
- Sort disjoint sublist
- Sort stability
- Sort using a custom comparator
- Sorting algorithms/Bead sort
- Sorting algorithms/Bogosort
- Sorting algorithms/Bubble sort
- Sorting Algorithms/Circle Sort
- Sorting algorithms/Cocktail sort
- Sorting algorithms/Comb sort
- Sorting algorithms/Counting sort
- Sorting algorithms/Gnome sort
- Sorting algorithms/Insertion sort
- Sorting algorithms/Merge sort
- Sorting algorithms/Pancake sort
- Sorting algorithms/Permutation sort
- Sorting algorithms/Quicksort
- Sorting algorithms/Selection sort
- Sorting algorithms/Shell sort
- Sorting algorithms/Stooge sort
- Sorting algorithms/Strand sort
- Special characters
- Special neighbor primes
- Special variables
- Speech synthesis
- Spiral matrix
- Stack
- Stair-climbing puzzle
- Start from a main routine
- Statistics/Basic
- Statistics/Normal distribution
- Stern-Brocot sequence
- String append
- String comparison
- String concatenation
- String interpolation (included)
- String length
- String matching
- String prepend
- Strip a set of characters from a string
- Substring
- Substring/Top and tail
- Subtractive generator
- Sudoku
- Sum and product of an array
- Sum digits of an integer
- Sum multiples of 3 and 5
- Sum of a series
- Sum of divisors
- Sum of first n cubes
- Sum of squares
- Summation of primes
- Sylvester's sequence
- Symmetric difference
- System time
T
- Table creation
- Tau function
- Tau number
- Taxicab numbers
- Temperature conversion
- Terminal control/Coloured text
- Terminal control/Ringing the terminal bell
- Test a function
- Test integerness
- Text processing/Max licenses in use
- The Twelve Days of Christmas
- Time a function
- Tokenize a string
- Top rank per group
- Topic variable
- Topswops
- Towers of Hanoi
- Trabb Pardo–Knuth algorithm
- Triangular numbers
- Trigonometric functions
- Truncatable primes
- Truncate a file
- Truth table
U
V
W
- Execution method/Interpreted
- Execution method/Compiled
- Garbage collection/Yes
- Parameter passing/By reference
- Parameter passing/By value
- Typing/Weak
- Typing/Checking/Dynamic
- Programming Languages
- Programming paradigm/Dynamic
- Programming paradigm/Functional
- Programming paradigm/Procedural
- Mathematical programming languages