From Documentation
Jump to: navigation, search
PARI/GP
Description: A computer algebra system designed for fast computations in number theory
SHARCNET Package information: see PARI/GP software page in web portal
Full list of SHARCNET supported software



Introduction

Please note PARI/GP is a package installed as part of the operating system.
There is no sharcnet module for PARI/GP and it is not supported on sharcnet.
However some basic information is provided below to help get started.

Basic Usage Information

o Rpms installed on the clusters at the time of this writing are:

[roberpj@orc-login2:~] rpm -qa | grep pari
pari-devel-2.3.5-2.el6.x86_64
pari-elldata-20120415-5.el6.noarch
pari-2.3.5-2.el6.x86_64
pari-emacs-2.3.5-2.el6.x86_64
pari-gp-2.3.5-2.el6.x86_64
pari-galdata-20080411-3.el6.noarch

o Some examples are shown here:

[roberpj@orc-login2:~] rpm -ql pari-gp-2.3.5 | grep examples
/usr/share/pari/examples
/usr/share/pari/examples/EXPLAIN
/usr/share/pari/examples/Inputrc
/usr/share/pari/examples/Makefile
/usr/share/pari/examples/bench.gp
/usr/share/pari/examples/cl.gp
/usr/share/pari/examples/classno.gp
/usr/share/pari/examples/contfrac.gp
/usr/share/pari/examples/extgcd.c
/usr/share/pari/examples/lucas.gp
/usr/share/pari/examples/rho.gp
/usr/share/pari/examples/squfof.gp
/usr/share/pari/examples/taylor.gp

o Compile link example with gcc:

[roberpj@orc-login2:~] gcc /usr/share/pari/examples/extgcd.c -lpari -lm
[roberpj@orc-login2:~] ./a.out
x = 10
y = 4
gcd = 2
u = 1
v = -2

o For an interactive session, you may want to copy and edit the default configuration file into your home directory then startup gp as follows:

[roberpj@orc-login2:~] cp /usr/share/pari/misc/gprc.dft $HOME/.gprc

[roberpj@orc-login2:~] gp -q
(18:44) gp > 2 + 5
7
(18:44) gp > 2 / 5
2/5
(18:44) gp > 2 * 5
10
(18:45) gp > 2 - 5
-3
(18:45) gp > quit

Getting Help

o Help using the gp command is available through man hp or using the help switch:

[roberpj@orc-login2:~] gp --help
### Usage: gp [options] [GP files]
Options are:
        [-f,--fast]     Faststart: do not read .gprc
        [-q,--quiet]    Quiet mode: do not print banner and history numbers
        [-p,--primelimit primelimit]
                        Precalculate primes up to the limit
        [-s,--stacksize stacksize]
                        Start with the PARI stack of given size (in bytes)
        [--emacs]       Run as if in Emacs shell
        [--help]        Print this message
        [--test]        Test mode. No history, wrap long lines (bench only)
        [--texmacs]     Run as if using TeXmacs frontend
        [--version]     Output version info and exit
        [--version-short]       Output version number and exit

Reference Links

PARI/GP Development Headquarters
http://pari.math.u-bordeaux.fr/

PARI/GP Wikipedia Examples
http://en.wikipedia.org/wiki/PARI/GP

An introduction to gp2c
http://pari.math.u-bordeaux.fr/~bill/GP2C/

List of Computer Algebra Systems
http://en.wikipedia.org/wiki/Comparison_of_computer_algebra_systems