From Documentation
Jump to: navigation, search
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


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

o Some examples are shown here:

[roberpj@orc-login2:~] rpm -ql pari-gp-2.3.5 | grep examples

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
(18:44) gp > 2 / 5
(18:44) gp > 2 * 5
(18:45) gp > 2 - 5
(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

PARI/GP Wikipedia Examples

An introduction to gp2c

List of Computer Algebra Systems