Misplaced Pages

PARI/GP: Difference between revisions

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.
Browse history interactively← Previous editNext edit →Content deleted Content addedVisualWikitext
Revision as of 07:24, 13 December 2006 editSkyBoxx (talk | contribs)187 edits rvv← Previous edit Revision as of 07:31, 13 December 2006 edit undoSWAdair (talk | contribs)Rollbackers8,626 edits rvNext edit →
Line 1: Line 1:
{{Infobox Software
'''PARI/GP''' is a ] with the main aim of facilitating ] computations.
| name = PARI/GP
As of July 2006, the stable version is 2.3.0 and the development version is 2.4.0. It is ] since Version 2.1.0 and is distributed under the terms of the ] as published by the ]. It runs on most common ]s.
| logo = ]
| screenshot = ]
| caption = PARI/GP in use on ]
| developer = Henri Cohen, Karim Belabas, et al., at the ]
| latest_release_version = 2.3.1
| latest_release_date = ], ]
| operating_system = ]
| genre = ]
| license = ]
| website = </nowiki>]
}}


'''PARI/GP''' is a ] with the main aim of facilitating ] computations. As of ] ], the stable version is 2.3.1 and the development version is 2.4.0. It is ] since Version 2.1.0 and is distributed under the terms of the ] as published by the ]. It runs on most common ]s.
PARI/GP was originally developed in ] by a team led by ] at Laboratoire A2X and is now maintained by ] at the ] with the help of many volunteer contributors.


==History==
The PARI 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 be used to compute ]s, to perform ] computations and to perform ]. It also allows computations with ], ]s, ], ]s and implements many ].
PARI/GP was originally developed in 1985 by a team led by ] at Laboratoire A2X and is now maintained by ] at the ] 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 ] and ] (of the ]).


==System overview==
Although quite an amount of symbolic manipulation is possible in PARI, the system does very badly compared to more sophisticated systems like ], ], ], ] or ] on such manipulations (e.g. ]s, ], 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 ]s that are familiar to ]s, and its extensive algebraic number theory module, which has no equivalent in the above-mentioned systems.
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 ] calculations, including on ]s (e.g., the ] can be millions of digits long—and billions of digits on ] machines). It can be used to compute ]s, to perform ] computations and to perform ]. It also allows computations with ], ]s, ], ]s and implements many ].


PARI/GP also comes with its own built-in graphical ] capability, and can be linked to '']'' to use it for rendering plots.
It is possible to use PARI in two different ways:
# as a library, which can be called from an upper-level language application (for instance written in ], ], ]. ], ], or ]).
# as a sophisticated programmable calculator, named ''gp'', which contains most of the control instructions of a standard language like C. It can be programmed in a language called ''GP''.


Although quite an amount of symbolic manipulation is possible in PARI/GP, the system does poorly compared to more sophisticated systems like ], ], ], ], ] or ] on such manipulations as, e.g., ]s, ], 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 ]s that are familiar to ]s, and its extensive algebraic number theory module, which has no equivalent in the above-mentioned systems.
Sample quick calculator usage:
? \p 200
realprecision = 202 significant digits (200 digits displayed)


The PARI/GP system consists of the following standard components:
? 123456! +0.0

time = 18,720 ms.
*'''PARI''' is a ] ], allowing for fast computations, and which can be called from an upper-level language application (for instance, written in C, ], ], ], ], or ]).
%33 = 2.604069904929137872951393056092656881827327040950301958461018557
*'''gp''' is an easy-to-use interactive ] 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''<nowiki>'</nowiki>s scripting language which can be used to program ''gp''.
9952057379676834157935607166171279087355200170616660008572612714566985893

730865282934317244121152865814030204645985573419251305342231136 E574964
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 ] (GNU Multiple Precision Arithmetic Library) for even much faster computations than PARI/GP's native ] 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 ] (although they quickly switched to ]), and after ''"pari de Pascal"'' (]).<ref>"TRIVIA" section of August 10, 2004</ref>

The first version of the ''gp'' calculator was originally called GPC, for Great Programmable Calculator. For some reason, the trailing C was eventually dropped.<ref>"TRIVIA" section of August 10, 2004</ref>

==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) ? sin(x)
time = 0 ms. time = 0 ms.
%34 = x - 1/6*x^3 + 1/120*x^5 - 1/5040*x^7 + 1/362880*x^9 - 1/39916800*x^11 %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) + 1/6227020800*x^13 - 1/1307674368000*x^15 + O(x^17)


Line 35: Line 69:
time = 5 ms. time = 5 ms.

? e = ellinit(); ellidentify(e)
time = 28 ms.
%4 = , , , ]], ]
<br>/* A famous rank 3 elliptic curve of conductor 5077. */

? K = bnfinit(x^2 + 23); K.cyc
time = 1ms.
%5 =
<br>/* This number field has class number 3. */

==See also==
*], a multiple-software mathematical package which includes PARI/GP as one of its components
*]
*]
*]
*]

==References==
<references/>


==External links== ==External links==
* *</nowiki>]
* at Karim Belabas homepage * at Karim Belabas's website
*; also in downloadable ] ] archive:
* François Dress, Seminaire de Théorie des Nombres de Bordeaux, Vol. 9 (1979-1980); an article on ISABELLE, PARI/GP's ancestor progam created in 1979.


]
] ]
]
]

Revision as of 07:31, 13 December 2006

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: