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

NAME

6       gp - PARI calculator
7

SYNOPSIS

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

DESCRIPTION

15       Invokes  the PARI-GP calculator, loading the file1, file2, ... (written
16       in the GP language) on startup. gp is an advanced programmable calcula‐
17       tor, which computes symbolically as long as possible, numerically where
18       needed, and contains a wealth of number-theoretic  functions  (elliptic
19       curves,  class  field  theory...).  It  can  be  programmed with the GP
20       scripting language. Its basic data types are
21
22       numbers
23              integers, real numbers, exact rational numbers,  algebraic  num‐
24              bers, p-adic numbers, modular integers (integers modulo n), com‐
25              plex numbers,
26
27       polynomials, rational functions,
28              and power series,
29
30       integral binary quadratic forms,
31
32       matrices, vectors,
33              and lists,
34
35       character strings,
36
37       and recursive combinations of these.
38
39

OPTIONS

41       Command line options are availaible in both short form (-f) and  POSIX-
42       like (--fast). Numeric arguments can be followed by a modifier k , M or
43       G at the user's convenience; in that case the argument is multiplied by
44       10^3, 10^6, or 10^9 respectively.
45
46
47       -f, --fast
48              Fast  start (or factory settings). Do not read .gprc (see below)
49              upon startup.
50
51       -p, --primelimit limit
52              Upon startup, gp computes a table of small primes used  in  num‐
53              ber-theoretic  applications.  If  primelimit  is  set, the table
54              include primes up to that bound instead of the default.   Unrea‐
55              sonably  high  values  will  considerably increase startup time.
56              Exceedingly small values will cause some number-theoretic  func‐
57              tions to fail with the message "not enough precomputed primes".
58
59       -q, --quiet
60              Quiet  mode.  Don't  print headers or history numbers, don't say
61              goodbye.
62
63
64       -s, --stacksize limit
65              Size of gp internal stack allocated on startup. When gp runs out
66              of  space,  it  interrupts  the current computation and raises a
67              stack overflow exception. If this occurs frequently, start  with
68              a bigger stack. The stack size can also be increased from within
69              gp, using default(parisize,...); it may  be  convenient  to  set
70              stacksize  from  your  .gprc.   Note  that  computations  with a
71              smaller stack may be more efficient due to better data locality.
72              Most computations should need less than 20MB.
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 relevant Emacs package (pari.el). It is set automatically by
79              the pari.el package, and will produce nice display  oddities  if
80              you set it 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):
122
123       The User's Guide to PARI/GP
124              (users.dvi)
125
126       The User's Guide to the PARI library
127              (library.dvi)
128
129       PARI/GP, a tutorial
130              (tutorial.dvi)
131
132       PARI/GP reference card
133              (refcard.ps):  4 pages, based on an earlier version by Joseph H.
134              Silverman.
135
136       pariemacs.txt
137              explains the use of the pari.el package, and how to customize it
138              (prompt, colors).
139
140

FILES

142       gp     main executable
143
144       $HOME/.gprc
145              (or  $GPRC  if  set)  read  at beginning of execution by each gp
146              shell. A default gprc gprc.dft is provided  with  the  distribu‐
147              tion.  If  this  file  cannot  be  found,  /etc/gprc  is checked
148              instead.
149
150       pari.log
151              default logfile (can be changed in .gprc or interactively  using
152              default() )
153
154       pari.ps
155              default psfile used for postscript output (as above)
156
157       gphelp default external help program (as above)
158
159       pari.el
160              elisp package to run pari in an Emacs shell. Must be loaded from
161              your .emacs file.
162
163       *.gp   GP programs
164
165

ENVIRONMENT

167       $GPRC  place to look for the  user's  gprc  file  (before  $HOME/.gprc,
168              ./gprc, and /etc/gprc in this order).
169
170
171       $GP_DATA_DIR
172              directory  containing  precomputed  data.  For  now,  the Galois
173              resolvents files in directory galdata/, needed by the  polgalois
174              function, in degrees 8 to 11.
175
176
177       $GPHELP
178              name  of  the external help program invoked by ?? and ??? short‐
179              cuts.
180
181
182       $GPTMPDIR
183              name of the directory where temporary files will be generated.
184
185

HOME PAGE

187       PARI's home page resides at
188              http://pari.math.u-bordeaux.fr/
189
190

MAILING LISTS

192       There are three mailing lists devoted to the PARI/GP package (run cour‐
193       tesy  of Dan Bernstein), and most feedback should be directed to those.
194       They are:
195
196
197       - pari-announce (moderated): for us to announce major version changes.
198
199       - pari-dev: for everything related to the development of PARI,  includ‐
200       ing suggestions, technical questions, bug reports or patch submissions.
201
202
203       - pari-users: for everything else.
204
205       To subscribe, send empty messages respectively to
206
207
208          pari-announce-subscribe@list.cr.yp.to
209
210          pari-users-subscribe@list.cr.yp.to
211
212          pari-dev-subscribe@list.cr.yp.to
213
214

BUG REPORTS

216       Bugs  should  be submitted online to our Bug Tracking System, available
217       from PARI's home page, or directly from the URL
218              http://pari.math.u-bordeaux.fr/Bugs/
219       Further instructions can be found on that page.
220
221

TRIVIA

223       Despite the leading G, GP has nothing to do with GNU. The first version
224       was  originally called GPC, for Great Programmable Calculator. For some
225       reason, the trailing C was eventually dropped.
226
227       PARI has nothing to do with the French capital. The name is a pun about
228       the  project's  early  stages  when  the authors started to implement a
229       library for "Pascal ARIthmetic"  in  the  PASCAL  programming  language
230       (they quickly switched to C).
231
232       For  the  benefit  of  non-native  French  speakers,  here's a slightly
233       expanded explanation: Blaise Pascal (1623-1662)  was  a  famous  French
234       mathematician  and philosopher who was one of the founders of probabil‐
235       ity and devised one of the first "arithmetic machines".  He  once  pro‐
236       posed  the  following "proof" of the existence of God for the unbeliev‐
237       ers: whether He exists or not I  lose  nothing  by  believing  in  Him,
238       whereas  if  He  does and I misbehave... This is the so-called "pari de
239       Pascal" (Pascal's Wager).
240
241       Note that PARI also means "fairy" in Persian.
242
243

AUTHORS

245       PARI was originally written by  Christian  Batut,  Dominique  Bernardi,
246       Henri Cohen, and Michel Olivier in Laboratoire A2X (Universite Bordeaux
247       I, France), and was maintained by Henri Cohen  up  to  version  1.39.15
248       (1995), and by Karim Belabas since then.
249
250       A  great  number  of people have contributed to the successive improve‐
251       ments which eventually resulted in the present version. See the AUTHORS
252       file in the distribution.
253
254

SEE ALSO

256       dvips(1), emacs(1), gap(1), ghostview(1), gphelp(1), maple(1), perl(1),
257       readline(3), tex(1), texmacs(1), xdvi(1)
258
259

COPYING

261       This program is free software; you can redistribute it and/or modify it
262       under  the  terms of the GNU General Public License as published by the
263       Free Software Foundation.
264
265       This program is distributed in the hope that it  will  be  useful,  but
266       WITHOUT  ANY  WARRANTY;  without  even  the  implied  warranty  of MER‐
267       CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the  GNU  General
268       Public License for more details.
269
270       You should have received a copy of the GNU General Public License along
271       with this program; if not, write to the Free Software Foundation, Inc.,
272       675 Mass Ave, Cambridge, MA 02139, USA.
273
274
275
276                                10 August 2004                           GP(1)
Impressum