Category:PARI/GP: Difference between revisions

From Rosetta Code
Content added Content deleted
(→‎Using PARI/GP: begin table)
(→‎Getting PARI/GP: flesh out table)
Line 21: Line 21:


== Getting PARI/GP ==
== Getting PARI/GP ==
PARI/GP can be downloaded at its official website's [http://pari.math.u-bordeaux.fr/download.html download page].
PARI/GP can be used in many different operating systems. For other systems, see the [http://pari.math.u-bordeaux.fr/download.html download page] or the [https://pari.math.u-bordeaux.fr/lists-index.html mailing lists].


{| class="wikitable"
{| class="wikitable"
Line 32: Line 32:
|-
|-
| rowspan="3" | Windows
| rowspan="3" | Windows
| many
| various
| installer (stable)
| installer (stable)
| [http://pari.math.u-bordeaux.fr/download.html#windows official site]
| [http://pari.math.u-bordeaux.fr/download.html#windows official site]
Line 42: Line 42:
| run
| run
|-
|-
| many
| various
| standalone binaries (daily)
| standalone binaries (daily)
| [http://pari.math.u-bordeaux.fr/pub/pari/windows/snapshots/ official site]
| [http://pari.math.u-bordeaux.fr/pub/pari/windows/snapshots/ official site]
Line 68: Line 68:
| <code>sudo pkg install pari-gp</code>
| <code>sudo pkg install pari-gp</code>
|-
|-
| many
| various
| build
| build from source
| [http://math.crg4.com/software.html#pari Instructions]
| [http://pari.math.u-bordeaux.fr/download.html official site]
| [http://pari.math.u-bordeaux.fr/download.html official site]
| [http://math.crg4.com/software.html#pari Building PARI/GP in Linux]
|-
|-
| rowspan="2" | Mac OS
| rowspan="2" | Mac OS
| many
| various
| DMG installer (stable)
| DMG installer (stable)
| [http://pari.math.u-bordeaux.fr/download.html#macos official site]
| [http://pari.math.u-bordeaux.fr/download.html#macos official site]
| Open dmg, drag to Applications
| Open dmg, drag to Applications
|-
|-
| many
| various
| standalone binary (stable)
| standalone binary (stable)
| [http://pari.math.u-bordeaux.fr/download.html#macos official site]
| [http://pari.math.u-bordeaux.fr/download.html#macos official site]
| run
| run
|-
| rowspan="5" | Android
| various
| package manager
| [https://f-droid.org/packages/fr.ubordeaux.math.paridroid/ f-droid]
|
|-
| 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]
|
|-
| various
| build from source
| [http://pari.math.u-bordeaux.fr/cgi-bin/gitweb.cgi?p=paridroid.git;a=summary official site]
|
|-
| iOS
| various
| package manager
| [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
| various
| web page
| [http://pari.math.u-bordeaux.fr/gp.html Emscripten]
|
|-
| various
| web page
| [http://pari.math.u-bordeaux.fr/gpexpwasm.html WebAssembly]
|
|-
| various
| web page
| [http://www.compileonline.com/execute_pari_online.php compile online]
|
|-
| various
| web page
| [https://cloud.sagemath.com/ SageMath cloud]
| [http://youtu.be/CzB6T7Nvc-s How to use PARI/GP in the SageMathCloud]
|}
|}

Android phones and tablets can use precompiled files from [http://pari.math.u-bordeaux.fr/download.html the official site], [https://f-droid.org/packages/fr.ubordeaux.math.paridroid/ f-droid] or [https://code.google.com/p/paridroid/ paridroid], or download source from [http://pari.math.u-bordeaux.fr/cgi-bin/gitweb.cgi?p=paridroid.git;a=summary the official site] o [https://github.com/FreeMonad/paridroid github].

While an iPhone/iPad version has not been developed, [https://itunes.apple.com/us/app/sage-math/id496492945?mt=8 sage-math] includes gp. 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.)

Finally, gp can be used online through the PARI/GP site via [[http://pari.math.u-bordeaux.fr/gp.html Emscripten] or [http://pari.math.u-bordeaux.fr/gpexpwasm.html WebAssembly]; [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]).


== Coding with PARI ==
== Coding with PARI ==

Revision as of 16:48, 15 February 2018

Language
PARI/GP
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:
Listed below are all of the tasks on Rosetta Code which have been solved using PARI/GP.


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. For other systems, see the download page or the mailing lists.

Operating system Kind Type of install Link How to install
Windows various installer (stable) official site run installer
XP, Vista, 7, 8, 10 standalone binaries (stable) official site run
various standalone binaries (daily) official site run
Linux Ubuntu/Debian package manager sudo apt-get install pari-gp
Fedora package manager sudo dnf install pari-gp
RHEL/CentOS package manager sudo yum install pari-gp
FreeBSD package manager sudo pkg install pari-gp
various build from source official site Building PARI/GP in Linux
Mac OS various DMG installer (stable) official site Open dmg, drag to Applications
various standalone binary (stable) official site run
Android various package manager f-droid
various package manager Google Play
various precompiled binary official site
various build from source github
various build from source official site
iOS various package manager 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 various web page Emscripten
various web page WebAssembly
various web page compile online
various web page SageMath cloud How to use PARI/GP in the SageMathCloud

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:

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 is a fork of the GP component of SageMath
  • Perl:
  • Common Lisp: Use Pari (CLISP).
  • Mathematica: A quick tutorial using MathLink is available.

See also

Resources

General

Tutorials

Papers on PARI/GP

Subcategories

This category has the following 3 subcategories, out of 3 total.

Pages in category "PARI/GP"

The following 200 pages are in this category, out of 606 total.

(previous page) (next page)
(previous page) (next page)