Introduction.

The PARI system is a package which is capable of doing formal computations on recursive types at high speed; it is primarily aimed at number theorists, but can be used by people whose primary need is speed.

Although quite an amount of symbolic manipulation is possible in PARI, this system does very badly compared to much more sophisticated systems like Reduce, Macsyma, Maple, Mathematica or Scratchpad (now Axiom) on such manipulations (e.g. multivariate polynomials, formal integration, etc...). On the other hand, the two main advantages of the system is its speed (which can be between 5 and 100 times better on many computations than the above mentioned systems), and the possibility of using directly data types which are familiar to mathematicians.

It is possible to use PARI in two different ways:

    1) as a library, which can be called from any upper-level language application (for instance written in C, C+ +, Pascal or Fortran);

    2) as a sophisticated programmable calculator, named GP, which contains most of the standard control instructions of a standard language like C.

The use of GP is explained in chapters 2 and 3, and the programming in library mode is explained in chapters 3 and 4. In the present chapter 1, we give an overview of the system.

Implementation notes.

Version of the PARI package contains essentially four versions. The first one is a specific implementation for 68020/68030/68040 based computers which contains a kernel (for the elementary arithmetic operations on multiprecise integers and real numbers, and binary/decimal conversion routines) entirely written in MC68020 assembly language (around 7000 lines), the rest being at present entirely written in C (although we are now looking into C++). The system runs on SUN-3/xx, Sony News, NeXT cubes and on the Macintosh II. It should be very easy to port on any other 680x0 based machine like for instance the Apollo Domain workstations.

Note that the assembly language source code uses the SUN syntax, which for some strange reason differs from the Motorola standard used by most other 680x0 machines in the world. On the Mac II disquettes, we have included a program which automatically converts from the SUN syntax into the standard one, at least for the needed PARI assembly file. On the Unix distribution, we have included other versions of the assembly file, using different syntaxes.

The second version is a specific implementation for SPARC version 7 based workstations, like the SPARCstation 1, 1+, 2 and the Solbourne 4000. This version contains only a few hundred lines of assembly code, and is usually slightly faster on the SPARCstation 1+ than on a SUN-3/60 or SUN-3/80. A version for SPARC version 8 is included, but has not been tested at this time due to the late delivery of such chips.

The third version is a specific implementation for the Hewlett-Packard HP-PA architecture. Like the Sparc version, this contains a few hundred lines of assembly code, and is quite fast.

Finally, a fourth version is written entirely in C, and should be portable with not too much trouble to any 32-bit computer having no real memory constraints It is again at least 2 times slower than the SPARC version. This version has been tested for example on the DECstations 3100 and 5000.

In addition to Unix workstations and MacII, Pari has been ported to a considerable number of smaller and larger machines, for example the VAX, 68000-based machines like the Atari, Mac Classic or Amiga 500, 68020 machines such as the Amiga 2500 or 3000, and even to MS-DOS 386 or better machines, using the djgpp port of the GNU C compiler and DOS-extender.