Category:PARI/GP: Difference between revisions

(→‎General: update hyperpolyglot link)
 
(47 intermediate revisions by 3 users not shown)
Line 20:
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.
 
== UsingGetting PARI/GP ==
PARI/GP can be downloadedused atin itsmany officialdifferent website'soperating systems. This is a reasonably comprehensive list of currently-supported systems; for other systems, please use the [httphttps://pari.math.u-bordeaux.fr/downloadlists-index.html downloadmailing pagelists].
 
{| class="wikitable"
Windows precompiled binaries are available: an installer, stand-alone stable and development versions, plus a nightly build with the very latest changes. [http://pari.math.u-bordeaux.fr/pub/pari/mac/snapshots/ Mac snapshots] are also available. Linux users can install PARI/GP with their favorite package manager (RPM, dpkg, apt, etc.) or build it from source. [http://math.crg4.com/software.html#pari Instructions] are available for compiling.
|-
 
! Operating system
Android phones and tablets can use [https://code.google.com/p/paridroid/ paridroid] (also [https://github.com/FreeMonad/paridroid on github]).
! Kind
 
! Type of install
While an iPhone/iPad version has not been developed, [https://itunes.apple.com/us/app/sage-math/id496492945?mt=8 sage-math] includes PARI and GP commands can be invoked with the wrapper function <code>pari</code>.
! Link
 
! How to install
Finally, gp can be used online through [http://pari.math.u-bordeaux.fr/gp.html the PARI/GP site] (via Emscripten), [http://www.compileonline.com/execute_pari_online.php compile online] or the [https://cloud.sagemath.com/ SageMath cloud] (see [http://youtu.be/CzB6T7Nvc-s How to use PARI/GP in the SageMathCloud]).
|-
| rowspan="3" | Windows
| various
| installer (stable or development)
| [http://pari.math.u-bordeaux.fr/download.html#windows official site]
| run installer
|-
| XP, Vista, 7, 8, 10
| standalone binaries (stable or development)
| [http://pari.math.u-bordeaux.fr/download.html#windows official site]
| run
|-
| various
| standalone binaries (daily)
| [http://pari.math.u-bordeaux.fr/pub/pari/windows/snapshots/ official site]
| run
|-
| rowspan="7" | Linux
| Ubuntu/Debian
| package manager
| [https://packages.debian.org/stretch/pari-gp Debian packages]
| <code>sudo apt-get install pari-gp</code>
|-
| Fedora
| package manager
| [https://apps.fedoraproject.org/packages/pari-gp Fedora packages]
| <code>sudo dnf install pari-gp</code>
|-
| Arch
| package manager
| [https://www.archlinux.org/packages/community/x86_64/pari/ Arch packages]
| <code>sudo pacman -S pari</code>
|-
| RHEL/CentOS
| package manager
|
| <code>sudo yum install pari-gp</code>
|-
| FreeBSD
| package manager
| [https://svnweb.freebsd.org/ports/head/math/pari/?view=log FreeBSD Ports Search]
| <code>sudo pkg install pari-2.11.3,2</code>
|-
| various
| package manager
| [https://formulae.brew.sh/formula-linux/pari Homebrew formula]
| <code>brew install pari</code>
|-
| various
| build from source
| [http://pari.math.u-bordeaux.fr/download.html official site]
| [http://math.crg4.com/software.html#pari Building PARI/GP in Linux]
|-
| rowspan="4" | macOS
| at least El Capitan (10.11)
| DMG installer (stable or development)
| [http://pari.math.u-bordeaux.fr/download.html#macos official site]
| Open dmg, drag to Applications (note: window may start minimized)
|-
| at least El Capitan (10.11)
| standalone binary (stable or development)
| [http://pari.math.u-bordeaux.fr/download.html#macos official site]
| run
|-
| unknown, at least OS X (10.?)
| package manager
| [https://ports.macports.org/port/pari/ MacPorts] (and [https://github.com/macports/macports-ports/blob/master/math/pari/Portfile portfile])
| <code>sudo port install pari</code>
|-
| unknown
| package manager
| [https://formulae.brew.sh/formula/pari Homebrew formula]
| <code>brew install pari</code>
|-
| rowspan="5" | Android
| various
| package manager
| [https://f-droid.org/packages/fr.ubordeaux.math.paridroid/ f-droid]
| Install via F-Droid client or install APK directly
|-
| various
| package manager
| [https://play.google.com/store/apps/details?id=fr.ubordeaux.math.paridroid&hl=en Google Play]
|
|-
| various
| precompiled binary
| [http://pari.math.u-bordeaux.fr/download.html#paridroid official site]
|
|-
| various
| build from source
| [https://github.com/FreeMonad/paridroid github]
| [https://github.com/FreeMonad/paridroid/wiki/Build-Environment Building] and [https://github.com/FreeMonad/paridroid/wiki/Installation Installing] (note: requires Android SDK Tools and Android NDK)
|-
| various
| build from source
| [http://pari.math.u-bordeaux.fr/cgi-bin/gitweb.cgi?p=paridroid.git;a=summary official site]
| [https://pari.math.u-bordeaux.fr/paridroid/index.html Installing PariDroid]
|-
| rowspan="2" | iOS
| ?
| Build from source on [https://ish.app/ iSH]
| [https://pari.math.u-bordeaux.fr/archives/pari-users-2111/msg00021.html Mailing list post]
| Turn on iSh Disable Screen Dimming Setting, then <code>apt get git gcc && git clone https://pari.math.u-bordeaux.fr/git/pari.git && cd pari && ./Configure && make install</code>
|-
| iOS 8+
| app
| [https://itunes.apple.com/us/app/sage-math/id496492945?mt=8 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 <code class="language-sage">pari</code> in a Sage snippet.)
|-
| rowspan="4" | online
| Chrome, Firefox, Internet Explorer
| local Javascript
| [http://pari.math.u-bordeaux.fr/gp.html Emscripten]
|
|-
| Chrome, Firefox
| local Javascript
| [http://pari.math.u-bordeaux.fr/gpexpwasm.html WebAssembly]
|
|-
| Chrome, Firefox, Internet Explorer
| client/server
| [https://www.tutorialspoint.com/execute_pari_online.php coding ground]
|
|-
| various
| client/server
| [https://cocalc.com/ CoCalc]
| [http://youtu.be/CzB6T7Nvc-s How to use PARI/GP in the SageMathCloud] (SageMathCloud is now CoCalc)
|}
 
== Coding with PARI ==
Line 40 ⟶ 172:
 
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 [http://pari.math.u-bordeaux.fr/pub/pari/manuals/gp2c/gp2c.html gp2c] utility converts GP scripts into executable C code.
** The [http://pari.math.u-bordeaux.fr/pub/pari/manuals/gp2c/gp2c.html gp2c] utility converts GP scripts into executable C code.
** For use with the Gnu Mpc library, there is also [http://www.multiprecision.org/?prog=pari-gnump Pari-Gnump].
** [https://www.multiprecision.org/paritwine/ PariTwine] is a glue library for various math libraries including GMP, GNU MPFR, GNU MPC, FLINT, ARB and CMH.
* [[C++]]: PARI can be used directly in C++. The code is intentionally written in a C++-compatible style. <code>-fpermissive</code> is sometimes useful when compiling with g++.
* [[C++]]: PARI can be used directly in C++. The code is intentionally written in a C++-compatible style. <code>-fpermissive</code> may be useful when compiling with g++.
* [[Python]]:
** [http://www.sagemath.org/ SageMath] (or SAGE) is a Python-based system that includes GP among others
** [http://code.google.com/p/pari-python/ pari-python]
** [https://pypi.python.org/pypi/cypari/ cythoncypari]/[https://github.com/sagemath/cypari2 cypari2] is a fork of the GP component of SageMath (see also the voluminous [https://buildmedia.readthedocs.org/media/pdf/cypari2/latest/cypari2.pdf CyPari2 Documentation])
* [[Perl]]:
** [http://search.cpan.org/dist/Math-Pari/ Math::Pari]
Line 58 ⟶ 192:
== Resources ==
=== General ===
*[http://pari.math.u-bordeaux.fr/faq.html Official FAQ]
*[http://www.math.utah.edu/faq/pari/pari.html PARI/GP FAQ]
*[http://pari.math.u-bordeaux.fr/ateliers.html Ateliers PARI/GP]: Conference slides and other resources
Line 63 ⟶ 198:
 
=== Tutorials ===
*[http://pari.math.u-bordeaux.fr/pub/pari/manuals/2.711.01/tutorial.pdf Official tutorial] by The PARI Group (5258 pp., 20142018)
*[http://www.math.u-bordeaux.fr/~ballombe/talks/bordeaux-20150924.pdf Tutorial on Elliptic Curves] by Bill Allombert and Karim Belabas (5 pp., 2016)
*[http://www.mathpersonal.psu.edu/wdbbug/467/pariinfo.pdf Beginning PARI Programming for CSE/MATH 467] by W. Dale Brownawell (7 pp., 2014)
*[http://www.maths.tcd.ie/~vlasenko/MA2316/ Class notes] including PARI/GP tutorial and sample code by Masha Vlasenko (2013)
*[http://www.math.uiuc.edu/~r-ash/GPTutorial.pdf Tutorial] by Robert B. Ash (20 pp., 2007)
*[http://people.math.umass.edu/~siman/09.791N/tutorial.pdf Tutorial] by Siman Wong (6 pp., 2009)
*[http://www.exploringbinary.com/exploring-binary-numbers-with-parigp-calculator/ Exploring binary numbers with PARI/GP calculator] by Rick Regan (appx. 4 pp., 2009)
* Class notes, parts [http://myweb.csuchico.edu/~blevitt/math230/230coursedocs/230notes/230notes_01.pdf 1][http://myweb.csuchico.edu/~blevitt/math230/230coursedocs/230notes/230notes_02.pdf 2][http://myweb.csuchico.edu/~blevitt/math230/230coursedocs/230notes/230notes_03.pdf 3][http://myweb.csuchico.edu/~blevitt/math230/230coursedocs/230notes/230notes_04.pdf 4][http://myweb.csuchico.edu/~blevitt/math230/230coursedocs/230notes/230notes_05.pdf 5][http://myweb.csuchico.edu/~blevitt/math230/230coursedocs/230notes/230notes_sieve.pdf sieve] by Benjamin L. Levitt (41 pp., 2009; now offline?)
*[http://www.math.uconn.edu/~kconrad/math5230f08/parihandout.pdf Introduction] by Keith Conrad (7 pp., 2008)
*[http://mvngu.wordpress.com/2008/08/01/parigp-programming-for-basic-cryptography/ PARI/GP programming for basic cryptography] by Minh Van Nguyen (appx. 3 pp., 2008); also appears in an [https://bitbucket.org/mvngu/www/downloads/2008-11-25_numtheory-crypto-gp.pdf extended version] (9 pp., 2008)
*[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://web.archive.org/web/20170324230906/http://users.aims.ac.za/~richard/faq/index.php archived version])
*[http://mvngu.wordpress.com/2008/08/01/parigp-programming-for-basic-cryptography/ PARI/GP programming for basic cryptography] by Minh Van Nguyen (appx. 3 pp., 2008); also appears in an [https://bitbucket.org/mvngu/www/downloads/2008-11-25_numtheory-crypto-gp.pdf extended version] (9 pp., 2008)
*[https://pari.math.u-bordeaux.fr/Events/PARI2019/talks/parallel.pdf Parallel Computation] by Bill Allombert
*[http://www.exploringbinary.com/exploring-binary-numbers-with-parigp-calculator/ Exploring binary numbers with PARI/GP calculator] by Rick Regan (appx. 4 pp., 2009)
 
*Video tutorials, parts [http://www.youtube.com/watch?v=0G-9JzlrzBM 1] [http://www.youtube.com/watch?v=d7i0rv59hns 2] [http://www.youtube.com/watch?v=wCyU2n-G-pk 3] [http://www.youtube.com/watch?v=WOCuBvK8O6Q 4] (appx. 20 minutes, 2011)
==== Non-English language ====
*French tutorials (slides) by Bill Allombert (2017):
** [https://pari.math.u-bordeaux.fr/Events/PARI2017c/talks/init.pdf Introduction à PARI/GP] (13 pp.)
** [https://pari.math.u-bordeaux.fr/Events/PARI2017c/talks/prog.pdf Programmation GP] (11 pp.)
** [https://pari.math.u-bordeaux.fr/Events/PARI2017c/talks/TAN.pdf Théorie algébrique des nombres] (31 pp.)
** [https://pari.math.u-bordeaux.fr/Events/PARI2017c/talks/TAN2.pdf Théorie algébrique des nombres avancée] (22 pp.)
** [https://pari.math.u-bordeaux.fr/Events/PARI2017c/talks/ecc.pdf Courbes elliptiques sur les corps finis] (4 pp.)
*[http://w3.countnumber.de/fischer/res-ZT2007/PariByExample.pdf Erste Schritte mit PARI/GP] by Lars Fischer (13 pp., 2007; German)
*[https://www.youtube.com/watch?v=I_GfMUGAlns Pari Gp مع NotPad++] by NoorDeen Rahmani (2020; 2:46; Arabic) -- setting up Notepad++ for syntax highlighting for PARI/GP.
*[http://www.maths.tcd.ie/~vlasenko/MA2316/ Class notes] including PARI/GP tutorial and sample code by Masha Vlasenko (2013)
 
* Class notes, parts [http://myweb.csuchico.edu/~blevitt/math230/230coursedocs/230notes/230notes_01.pdf 1][http://myweb.csuchico.edu/~blevitt/math230/230coursedocs/230notes/230notes_02.pdf 2][http://myweb.csuchico.edu/~blevitt/math230/230coursedocs/230notes/230notes_03.pdf 3][http://myweb.csuchico.edu/~blevitt/math230/230coursedocs/230notes/230notes_04.pdf 4][http://myweb.csuchico.edu/~blevitt/math230/230coursedocs/230notes/230notes_05.pdf 5][http://myweb.csuchico.edu/~blevitt/math230/230coursedocs/230notes/230notes_sieve.pdf sieve] by Benjamin L. Levitt (41 pp., 2009; now offline?)
==== Video tutorials ====
*[http://users.aims.ac.za/~richard/faq/index.php Pari/GP Tutorial] by Akinola Richard Olatokunbo
* [https://www.youtube.com/watch?v=RQLqQHu7i0Y Pari/GP Tutorial: Basics] by Leandro Junes (2020, 19:04)
*[https://www.youtube.com/watch?v=FeG0BYRrDOE&t=12m Video demo of RSA in PARI/GP] by Maren1955 (2014, 17:39)
*Video tutorials, parts [http://www.youtube.com/watch?v=0G-9JzlrzBM 1] [http://www.youtube.com/watch?v=d7i0rv59hns 2] [http://www.youtube.com/watch?v=wCyU2n-G-pk 3] [http://www.youtube.com/watch?v=WOCuBvK8O6Q 4] (2011, appx. 20 minutes)
 
=== Papers on PARI/GP ===
* Karim Belabas and Henri Cohen, [https://arxiv.org/abs/1810.00547 Modular Forms in Pari/GP], ''Research in the Mathematical Sciences'' '''5''':37 (2018)
* Henri Cohen, [https://arxiv.org/abs/1809.10908 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, [https://www.math.u-bordeaux.fr/~jjaulent/Articles/bnflog.ps The logarithmic class group package in PARI/GP], ''Mathematical Publications of Besançon, Algebra and Number Theory'' (2016), pp. 5&ndash;18.
* Bill Alombert, [http://www.math.u-bordeaux.fr/~allomber/darkpaper.pdf A new interpretor for PARI/GP], ''Journal de Théorie des Nombres de Bordeaux'' '''20''':3 (2008), pp. 531&ndash;541. (English)
* Paul Zimmermann, [http://www.loria.fr/~zimmerma/talks/henri.pdf 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, [https://home.bway.net/lewis/cacomp.ps 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)
 
[[Category:Mathematical programming languages]]