1GP(1)                       General Commands Manual                      GP(1)
2
3
4

NAME

6       gp - The PARI calculator
7

SYNOPSIS

9       gp  [-s  stacksize]  [-p primelimit] [--emacs] [-f|--fast] [-q|--quiet]
10       [-D|--default  key=val]  [--help]  [--test]   [--texmacs]   [--version]
11       [--version-short] [ file1 file2 ...]
12
13

DESCRIPTION

15       Invokes  the PARI-GP calculator gp; gp is an advanced programmable cal‐
16       culator, specializing in number theory, which computes symbolically  as
17       long  as  possible,  numerically where needed, and contains a wealth of
18       arithmetic functions: factorizations, elliptic curves,  Galois  theory,
19       class  field  theory,  modular forms, etc.  Commands, written in the GP
20       scripting language, are input interactively or loaded from files.
21
22       If present at the end of the command line, files 'file1', 'file2',  ...
23       are loaded on startup; they must be written in the GP language.
24
25

OPTIONS

27       Command  line  options are available in both short form (-f) and POSIX-
28       like (--fast). Numeric arguments can be followed by a modifier k , M or
29       G at the user's convenience; in that case the argument is multiplied by
30       10^3, 10^6, or 10^9 respectively.
31
32
33       -f, --fast
34              Fast start (or factory settings). Do not read .gprc (see  below)
35              upon startup.
36
37       -p limit
38              [DEPRECATED]  Upon  startup, gp computes a table of small primes
39              used in number-theoretic applications. If primelimit is set, the
40              table  include primes up to that bound instead of the default (=
41              500000). It is now mostly useless to change this value.
42
43       -q, --quiet
44              Quiet mode. Do not print headers or history numbers and  do  not
45              say goodbye.
46
47
48       -D, --default key=val
49              performs  default(key,  val); on startup, overriding values from
50              the gprc preferences file. 'val' must be a constant value and is
51              not  allowed to involve any computation (e.g. 1+1 is forbidden).
52              Any number of such default-setting statements may appear on  the
53              command  line. A key may be set multiple times, the last setting
54              taking precedence
55
56
57       -s limit
58              Size of gp internal stack allocated on startup. When gp runs out
59              of  space,  it  interrupts  the current computation and raises a
60              stack overflow exception. If this occurs frequently, start  with
61              a bigger stack. The stack size can also be increased from within
62              gp, using default(parisize,limit); it is convenient to set pari‐
63              size  from  your  .gprc to that the setting is persistent across
64              sessions; a value of 80MB is sensible.  We  strongly  advise  to
65              also  set  parisizemax to a positive, much larger, value in your
66              .gprc (about what you believe your machine  can  stand,  usually
67              half  the  available RAM or so): this strives to fit computation
68              in the parisize range but allows it to temporarily go beyond  it
69              (up  to  parisizemax).   Note  that  computations with a smaller
70              stack may  be  more  efficient  due  to  better  data  locality.
71              Finally,  threadsize  and  threadsizemax play analogous roles in
72              the parallel version of gp.
73
74
75       --emacs
76              gp can be run in an  Emacs  shell  (see  GP  User's  manual  for
77              details). This flag is then required for smooth interaction with
78              the PariEmacs package (pari.el). It is set automatically by  the
79              pari.el package, and will produce display oddities if you set it
80              outside of an Emacs session.
81
82       --help print a summary of available command-line options.
83
84       --test run gp in test mode: suppress printing of  history  numbers  and
85              wrap  long  output  lines  (to  get  readable  diff output). For
86              benches only.
87
88       --texmacs
89              gp can be run from a TeXmacs frontend. This flag is set by  TeX‐
90              macs,  to  enable special purpose communication channels. Do not
91              set it yourself.
92
93
94       --version
95              output version info (banner) then exit.
96
97
98       --version-short
99              output version number then exit.
100
101

USE

103       ?      to get online help.
104
105       ??     to get extended online help (more precisely, to call the  exter‐
106              nal help program, gphelp by default)
107
108       quit   (or \q), or EOF (Ctrl-D) to quit gp.
109
110       The following works only when gp was linked with GNU readline library:
111
112       arrow keys
113              for editing and viewing the input history.
114
115       TAB
116               for automatic completion
117
118

MANUALS

120       The following material is included in the standard distribution (origi‐
121       nally in TeX format) and can also be downloaded at
122              http://pari.math.u-bordeaux.fr/doc.html
123       or viewed online at
124              http://pari.math.u-bordeaux.fr/dochtml/html/
125
126
127       The User's Guide to PARI/GP
128              (users.dvi)
129
130       The User's Guide to the PARI library
131              (library.dvi)
132
133       The Developer's Guide to the PARI library
134              (develop.dvi)
135
136       PARI/GP, a tutorial
137              (tutorial.dvi)
138
139       PARI/GP reference cards
140              (refcard*.dvi)
141
142

FILES

144       gp     main executable
145
146       $HOME/.gprc
147              (or $GPRC if set) user preference file,  read  at  beginning  of
148              execution  by each gp shell. A default gprc gprc.dft is provided
149              with the distribution. If this file cannot be  found,  /etc/gprc
150              is checked instead.
151
152
153       <logfile>
154              a  file  used  to  log  in  all  commands  and results; default:
155              pari.log (you need to set the log default in your gprc or inter‐
156              actively)
157
158
159       <psfile>
160              a file used to dump PostScript drawings; default: pari.ps
161
162
163       <histfile>
164              a  file  where gp will keep a history of all input commands (you
165              need to set the histfile default in the gprc file)
166
167
168       gphelp default external help program (as above)
169
170       *.gp   GP programs
171
172

ENVIRONMENT

174       $GPRC  place to look for the user's preference file (gprc); if the file
175              does  not  exist,  we  then check in $HOME/.gprc, /etc/gprc, and
176              finally for a file named 'gprc' in PARI's datadir.
177
178
179       $GP_DATA_DIR
180              directory containing data installed by optional  PARI  packages.
181              For  example,  the Galois resolvents files in directory galdata/
182              needed by the polgalois function, in degrees 8  to  11;  or  the
183              modular  polynomials  in seadata/ used by the ellap function for
184              large base fields. This environment  variable  overrides  PARI's
185              'datadir', defined at Configure time.
186
187
188       $GP_POSTSCRIPT_VIEWER
189              an  application  able  to  display PostScript files, used by the
190              plotps graphic engine. This engine is a fallback used to  output
191              hi-res  plots  even  when  no  compatible  graphical library was
192              available on your platform at Configure time. (Dumps  the  graph
193              to a temporary file, then open the file.)
194
195
196       $GP_SVG_VIEWER
197              an  application  able  to  display SVG images files, used by the
198              plotsvg graphic engine. This engine is a fallback used to output
199              hi-res  plots  even  when  no  compatible  graphical library was
200              available on your platform at Configure time. (Dumps  the  graph
201              to a temporary file, then open the file.)
202
203
204       $GPHELP
205              name  of  the external help program invoked by ?? and ??? short‐
206              cuts.
207
208
209       $GPTMPDIR
210              name of the directory where temporary files will be generated.
211
212

HOME PAGE

214       PARI's home page resides at
215              http://pari.math.u-bordeaux.fr/
216
217

MAILING LISTS

219       There are a number of mailing lists devoted to the PARI/GP package, and
220       most feedback should be directed to those. See
221              http://pari.math.u-bordeaux.fr/lists.html
222       for details. The most important ones are:
223
224
225       - pari-announce (moderated): for us to announce major version changes.
226
227       -  pari-dev: for everything related to the development of PARI, includ‐
228       ing suggestions, technical questions, bug reports or patch submissions.
229
230
231       - pari-users: for discuss about everything else, in particular ask  for
232       help.
233
234       To  subscribe,  send empty messages with a Subject: containing the word
235       "subscribe" respectively to
236
237
238          pari-announce-request@pari.math.u-bordeaux.fr
239
240          pari-users-request@pari.math.u-bordeaux.fr
241
242          pari-dev-request@pari.math.u-bordeaux.fr
243
244

BUG REPORTS

246       Bugs should be submitted online to our Bug Tracking  System,  available
247       from PARI's home page, or directly from the URL
248              http://pari.math.u-bordeaux.fr/Bugs/
249       Further instructions can be found on that page.
250
251

TRIVIA

253       Despite the leading G, GP has nothing to do with GNU. The first version
254       was originally called GPC, for Great Programmable Calculator. When peo‐
255       ple  started  calling  it  "the  GPC  Calculator",  the  trailing C was
256       dropped.
257
258       PARI has nothing to do with the French capital. The name is a pun about
259       the  project's  early  stages  when  the authors started to implement a
260       library for "Pascal ARIthmetic" in  the  PASCAL  programming  language.
261       They quickly switched to C.
262
263       For  the  benefit  of  non-native  French  speakers,  here's a slightly
264       expanded explanation: Blaise Pascal (1623-1662)  was  a  famous  French
265       mathematician  and philosopher who was one of the founders of probabil‐
266       ity and devised one of the first "arithmetic machines".  He  once  pro‐
267       posed  the  following "proof" of the existence of God for the unbeliev‐
268       ers: whether He exists or not I  lose  nothing  by  believing  in  Him,
269       whereas  if  He  does and I misbehave... This is the so-called "pari de
270       Pascal" (Pascal's Wager).
271
272       Note that PARI also means "fairy" in Persian.
273
274

AUTHORS

276       PARI was originally written by  Christian  Batut,  Dominique  Bernardi,
277       Henri Cohen, and Michel Olivier in Laboratoire A2X (Universite Bordeaux
278       I, France), and was maintained by Henri Cohen  up  to  version  1.39.15
279       (1995), and by Karim Belabas since then.
280
281       A  great  number  of people have contributed to the successive improve‐
282       ments which eventually resulted in the present version. See the AUTHORS
283       file in the distribution.
284
285

SEE ALSO

287       gap(1), gphelp(1), perl(1), readline(3), sage(1), tex(1), texmacs(1),
288
289

COPYING

291       This program is free software; you can redistribute it and/or modify it
292       under the terms of the GNU General Public License as published  by  the
293       Free Software Foundation.
294
295       This  program  is  distributed  in the hope that it will be useful, but
296       WITHOUT ANY  WARRANTY;  without  even  the  implied  warranty  of  MER‐
297       CHANTABILITY  or  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
298       Public License for more details.
299
300       You should have received a copy of the GNU General Public License along
301       with this program; if not, write to the Free Software Foundation, Inc.,
302       675 Mass Ave, Cambridge, MA 02139, USA.
303
304
305
306                               11 September 2017                         GP(1)
Impressum