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:22, 13 December 2006 edit209.208.77.214 (talk) Added more information.← Previous edit Revision as of 07:24, 13 December 2006 edit undoSkyBoxx (talk | contribs)187 edits rvvNext edit →
Line 1: Line 1:
'''PARI/GP''' is a ] with the main aim of facilitating ] computations.
{{Infobox Software
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.
| name = PARI/GP
| 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 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.
'''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.


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 ].
==History==
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 ]).


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.
==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 ] 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 ].


It is possible to use PARI in two different ways:
PARI/GP also comes with its own built-in graphical ] capability, and can be linked to '']'' to use it for rendering plots.
# 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''.


Sample quick calculator usage:
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.
? \p 200
realprecision = 202 significant digits (200 digits displayed)


? 123456! +0.0
The PARI/GP system consists of the following standard components:
time = 18,720 ms.

%33 = 2.604069904929137872951393056092656881827327040950301958461018557
*'''PARI''' is a ] ], allowing for fast computations, and which can be called from an upper-level language application (for instance, written in C, ], ], ], ], or ]).
9952057379676834157935607166171279087355200170616660008572612714566985893
*'''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''.
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.
%3 = x - 1/6*x^3 + 1/120*x^5 - 1/5040*x^7 + 1/362880*x^9 - 1/39916800*x^11 %34 = 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 69: Line 35:
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's website * at Karim Belabas homepage
*; 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:24, 13 December 2006

PARI/GP is a computer algebra system with the main aim of facilitating number theory computations. As of July 2006, the stable version is 2.3.0 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.

PARI/GP was originally developed in 1987 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.

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 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.

Although quite an amount of symbolic manipulation is possible in PARI, the system does very badly compared to more sophisticated systems like AXIOM, Macsyma, Maple, Mathematica or Reduce on such manipulations (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.

It is possible to use PARI in two different ways:

  1. as a library, which can be called from an upper-level language application (for instance written in C, C++, Pascal. Fortran, Perl, or Python).
  2. 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.

Sample quick calculator usage:

? \p 200
  realprecision = 202 significant digits (200 digits displayed)
? 123456! +0.0
time = 18,720 ms.
%33 = 2.604069904929137872951393056092656881827327040950301958461018557
9952057379676834157935607166171279087355200170616660008572612714566985893
730865282934317244121152865814030204645985573419251305342231136 E574964
? sin(x)
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 
+ 1/6227020800*x^13 - 1/1307674368000*x^15 + O(x^17)
? for(z=25,30, print (factor(2^z-1)))
time = 5 ms.

External links

Category: