Misplaced Pages

PARI/GP

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.

This is an old revision of this page, as edited by SWAdair (talk | contribs) at 07:31, 13 December 2006 (rv). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Revision as of 07:31, 13 December 2006 by SWAdair (talk | contribs) (rv)(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)
PARI/GP
PARI/GP in use on Windows XP
Developer(s)Henri Cohen, Karim Belabas, et al., at the Université Bordeaux 1
Stable release2.3.1 / October 5, 2006
Repository
Operating systemCross-platform
TypeComputer algebra system
LicenseGNU General Public License
WebsitePARI/GP Development Headquarter

PARI/GP is a computer algebra system with the main aim of facilitating number theory computations. As of October 5 2006, the stable version is 2.3.1 and the development version is 2.4.0. It is free software since Version 2.1.0 and is distributed under the terms of the GNU General Public License as published by the Free Software Foundation. It runs on most common operating systems.

History

PARI/GP was originally developed in 1985 by a team led by Henri Cohen at Laboratoire A2X and is now maintained by Karim Belabas at the University of Bordeaux with the help of many volunteer contributors. PARI/GP's progenitor was a program named ISABELLE, an interpretor for higher arithmetic written in 1979 by Henri Cohen and François Dress (of the Université de Bordeaux I).

System overview

The PARI/GP system is a package that is capable of doing formal computations on recursive types at high speed. It is primarily aimed at number theorists, but can be used by anybody whose primary need is speed. It can perform arbitrary precision calculations, including on irrational numbers (e.g., the significand can be millions of digits long—and billions of digits on 64-bit machines). It can be used to compute factorizations, to perform elliptic curve computations and to perform algebraic number theory. It also allows computations with matrices, polynomials, power series, algebraic numbers and implements many special functions.

PARI/GP also comes with its own built-in graphical plotting capability, and can be linked to gnuplot to use it for rendering plots.

Although quite an amount of symbolic manipulation is possible in PARI/GP, the system does poorly compared to more sophisticated systems like Maxima, Axiom, Reduce, Macsyma, Mathematica or Maple on such manipulations as, e.g., multivariate polynomials, formal integration, and so on. On the other hand, the three main advantages of the system are its speed (which can be between 5 and 100 times better on many computations), the possibility of directly using data types that are familiar to mathematicians, and its extensive algebraic number theory module, which has no equivalent in the above-mentioned systems.

The PARI/GP system consists of the following standard components:

  • PARI is a C library, allowing for fast computations, and which can be called from an upper-level language application (for instance, written in C, C++, Pascal, Fortran, Perl, or Python).
  • gp is an easy-to-use interactive command line interface giving access to the PARI functions. It functions as a sophisticated programmable calculator which contains most of the control instructions of a standard language like C. GP is the name of gp's scripting language which can be used to program gp.

Also available is gp2c, the GP-to-C compiler, which compiles GP scripts into the C language and transparently loads the resulting functions into gp. The advantage of this is that gp2c-compiled scripts will typically run three to four times faster. Currently, gp2c only understands a subset of the GP language.

Furthermore, PARI/GP can be compiled with GMP (GNU Multiple Precision Arithmetic Library) for even much faster computations than PARI/GP's native arbitrary precision kernel.

Etymology of the PARI/GP name

The name PARI is a pun about the project's early stages when the authors started to implement a library for "Pascal ARIthmetic" in the Pascal programming language (although they quickly switched to C), and after "pari de Pascal" (Pascal's Wager).

The first version of the gp calculator was originally called GPC, for Great Programmable Calculator. For some reason, the trailing C was eventually dropped.

Usage examples

Below are some samples of the gp calculator usage:

? \p 212
   realprecision = 221 significant digits (212 digits displayed)
? 148.7^0.3721
time = 0 ms.
%1 = 6.4315686761687428232463963595991663095614617461851330959022336592679249
83664424375749173149713566544671777981026987042189396584904780584382369995989
2470992868949783084618518182456887849078305105083627437215091767
? 123456! + 0.
time = 1,656 ms.
%2 = 2.6040699049291378729513930560926568818273270409503019584610185579952057
37967683415793560716617127908735520017061666000857261271456698589373086528293
4317244121152865814030204645985573419251305342231135573491050756 E574964
? sin(x)
time = 0 ms.
%3 = x - 1/6*x^3 + 1/120*x^5 - 1/5040*x^7 + 1/362880*x^9 - 1/39916800*x^11 
+ 1/6227020800*x^13 - 1/1307674368000*x^15 + O(x^17)
? for(z=25,30, print (factor(2^z-1)))
time = 5 ms.
? e = ellinit(); ellidentify(e)
time = 28 ms.
%4 = , , , ]], ]

/* A famous rank 3 elliptic curve of conductor 5077. */
? K = bnfinit(x^2 + 23); K.cyc
time = 1ms.
%5 = 

/* This number field has class number 3. */

See also

References

  1. "TRIVIA" section of "Manpage of GP," August 10, 2004
  2. "TRIVIA" section of "Manpage of GP," August 10, 2004

External links

Categories: