Short:    Linear algebra and number theory. Bin.
Author:   pari@ceremab.u-bordeaux.fr, nisse@lysator.liu.se
Uploader: nisse@lysator.liu.se
Type:     misc/math

About PARI             (14 dec 1993)
----------

PARI is the name of a sophisticated and free math package. GP is a
calculator that offers all the features of PARI and some more. PARI
uses *infinite* precision rational numbers and *arbitrary* precision
floating point numbers. 

You can use complex numbers, vectors, matrices, polynomials, rational
functions and taylor expansions. PARI also handles integers mod n,
finite fields, algebraic numbers and p-adic numbers. PARI includes
standard numerical methods and the GP calculator also includes
hi-resolution plotting.

PARI is written by four professional number theorists, C. Batut, 
D. Bernardi, H. Cohen and M. Olivier. The latter two are Professors of
Mathematics.

-------

This amiga distribution contains the GP calculator compiled for
different processors, an emacs mode for running GP, partial
documentation, and all the amiga specific files I used to compile GP.
The amiga hi-resolution plotting functions are written by Jerry
Tunnell, who kindly let me use and distribute them.

If you want full source and documentation, you will have to get the
source distribution. It *should* be available where you found this
package, as file pari-1.38.3.gz or something similar (*Please* keep
this archive and the source archive together. If you like GP, you will
probably want the documentation too). If you can't find the source
anywhere else, you can try to ftp to megrez.ceremab.u-bordeaux.fr,
directory pub/pari/unix. This is the main PARI site.


Files
-----
  
amiga/			 Amiga specific files and sources.
	makefile.68000	 Makefiles for different amiga versions.
	makefile.68020 
	makefile.68881
	mpAmiga.s	 Assembler file (gcc syntax) for the 68020 versions.
			 Converted from mp.s with the convert68k.el program in
			 the elisp directory.	
	plotAmiga.c	 Hi-resolution plotting functions, written by J.B. Tunnell.
	version68k.diff  Source diffs to add an Amiga version string.
	versionport.diff

bin/
	gp.68000	 GP binaries for different processors.
	gp.68020
	gp.68881

doc/			 This directory does not contain the complete documentation,
	usersch3.tex	 only one file that is needed by pari.el

elisp/
	convert68k.el	 Elisp program to convert a sun3 style 68k assembler file
			 (read mp.s) into something that amiga gcc can understand.
	pari.el		 An Emacs mode for the GP calculator. Desribed below and
	pari.elc	 in the file pari.txt
	pari.menu	 Used by pari.el.
	pari.txt	 A description of pari-mode

examples/
	EXPLAIN		 Description of the examples.
	Makefile	 Note that you cannot compile the C example
	Makesimple	 without the libpari.a library.
	bench.gp
	clareg.gp
	lucas.gp
	mattrans.c
  	rho.gp
	squfof.gp
  	tutnf.gp
	tutnfout


Starting PARI
-------------

First, you need to install Markus Wild's ixemul.library, if you don't
have it already. Version 39.45 is the most recent non-buggy version I
know of (39.47 seems to be unreliable). This library is available on
Aminet (for example at ftp.luth.se) and is included in the gcc
distribution.

GP (file gp.68020 or whichever version you use) takes three command line
options. The most important is '-s STACKSIZE'. This sets the initial
size of the internal PARI stack (not to be confused with the task
stack). The default value is 4 MB which may be more RAM than you have
available. Try 'gp -s 1000000' or 'gp -s 100000' if GP refuses to
start. The other two flags are '-p PRIMELIMIT' and '-b BUFFERSIZE'.
Default values are 500000 and 30000 respectively.

Talking about the task stack, I don't know exactly how large it must
be. I use a stack of 100000 bytes, and that seems to be enough. To set
the task stack, use the command 'STACK 100000' command from the shell,
not the -s option to GP.

At the pari command prompt (default '?'), \q or CTRL-\ exits GP. You
can type '?' to get some on-line help. Note that running GP inside
emacs gives you better online help.

The GP command interface is quite straight forward if you are used to
MATLAB or similar systems. Note that with GP both vectors and matrices
are typed with with square brackets '[' ']', with comma ',' separating
elements on the same row and semicolon ';' separating rows. For
example, a 2-2 matrix is typed '[1,2 ; 3,4]'.

The emacs mode.  
--------------- 
To use this on the amiga, you must make sure that you have mounted the
FIFO: device, and that the SHELL environment variable is set to some
unix-style shell. I use the shell distributed with gcc, a port of
pdksh (file name gcc/bin/sh). The shell distributed with GNUemacs
might work too, but I haven't tried it. The emacs mode is described in
the file elisp/pari.txt. If you don't wan't to edit the pari.el file,
you should assign PARI: to the directory where you have installed
PARI.

Known bugs
----------
GP does not respond to CTRL-C when run from the shell. However, if you
send the CTRL-C signal from another shell window (with the BREAK
command) or type CTRL-C in GP's emacs buffer, GP is interrupted.

A free() call occasionally failes when using the 68000 or 68020
versions of GP. I have not had this problem with the 68881 version.

I'm tempted to blame both these problems on the ixemul.library, but
I'm not sure what happens.  

For those who are curious about the differences between the three
versions gp.68000, gp.68020 and gp.68881: 

* The first two are compiled with gcc -msoftfloat instead of gcc
-m68881. If a 68881 processor is present, all three version makes use
of it. The performance difference between the gp.68020 and the 68881
version should be rather small on any machine that can run both. I
included the 68881 because it seemes more reliable.

* In the 68020 and 68881 versions, some low level functions are
written in 68020 assembler, while the 68000 version is written
entirely in C and is compiled with gcc -m68000 to make sure that it
contains only 68000 instructions.

------- 
Enjoy GP!

Feel free to send me comments and questions (and even bug reports).
	Niels Möller
	Ställdalsvägen 11
	122 43 Enskede
	SWEDEN
email:	nisse@lysator.liu.se

For questions and bug reports not specific to the amiga version, you
can also write to the authors:
	pari@ceremab.u-bordeaux.fr


============================= Archive contents =============================

Original  Packed Ratio    Date     Time    Name
-------- ------- ----- --------- --------  -------------
    3810    1338 64.8% 07-Dec-93 00:42:02 +makefile.68000
    3822    1345 64.8% 08-Dec-93 22:11:46 +makefile.68020
    3820    1345 64.7% 08-Dec-93 11:50:54 +makefile.68881
  252237   41121 83.6% 06-Dec-93 23:43:52 +mpAmiga.s
   18263    4075 77.6% 10-Nov-93 20:54:16 +plotAmiga.c
     357     246 31.0% 08-Dec-93 22:17:18 +version68k.diff
     360     248 31.1% 08-Dec-93 22:17:34 +versionport.diff
  741836  347584 53.1% 08-Dec-93 19:52:18 +gp.68000
  664588  332545 49.9% 10-Dec-93 20:07:46 +gp.68020
  653256  328318 49.7% 06-Dec-93 23:45:06 +gp.68881
  186465   56779 69.5% 25-Nov-93 17:43:22 +usersch3.tex
    3537    1332 62.3% 17-Sep-93 20:21:12 +convert68k.el
   25992    7880 69.6% 08-Dec-93 23:33:00 +pari.el
   16577    6269 62.1% 08-Dec-93 23:10:42 +pari.elc
    3710    1621 56.3% 06-Nov-93 11:46:46 +pari.menu
    9737    3698 62.0% 18-Jul-93 13:24:50 +pari.txt
     100      84 16.0% 05-Aug-93 11:33:36 +bench.gp
    2169    1108 48.9% 01-Nov-93 18:30:14 +clareg.gp
    3319    1602 51.7% 01-Nov-93 18:29:14 +EXPLAIN
      52      52  0.0% 05-Aug-93 11:33:16 +lucas.gp
     182     136 25.2% 04-Nov-93 03:53:16 +Makefile
     151     129 14.5% 05-Nov-93 11:52:34 +Makesimple
    1483     805 45.7% 02-May-93 16:06:40 +mattrans.c
     260     149 42.6% 05-Aug-93 11:36:46 +rho.gp
     709     394 44.4% 07-Feb-93 04:24:20 +squfof.gp
    1745     856 50.9% 03-Dec-93 12:16:48 +tutnf.gp
    7956    3048 61.6% 03-Dec-93 12:19:08 +tutnfout
    3265    1495 54.2% 28-Nov-93 18:04:40  Newin1.39
    3086    1615 47.6% 01-Nov-93 18:48:50  README
    6156    2926 52.4% 18-Dec-93 14:51:22  README.amiga
     534     319 40.2% 01-Nov-93 18:45:16  TODO
-------- ------- ----- --------- --------
 2619534 1150462 56.0% 08-Jun-95 10:09:10   31 files
