[81] in mathematical software users group

home help back first fref pref prev next nref lref last post

Re: multiple integral & pari

daemon@ATHENA.MIT.EDU (Mohamed Omar Rayes)
Sat Apr 24 19:50:08 1993

From: rayes@vonneuman.cs.uakron.edu (Mohamed Omar Rayes)
To: siman@BOURBAKI.MIT.EDU
Date: Sat, 24 Apr 93 19:49:09 EDT
Cc: msug@Athena.MIT.EDU
In-Reply-To: <9304232127.AA06756@cayley>; from "siman@BOURBAKI.MIT.EDU" at Apr 23, 93 5:27 pm

> 
> Hi Everybody,
> 
> I'm new to this mailing list, and I have a couple of questions about math
> softwares.
> 
> First, is anybody here familar with a public domain software called "pari-gp"?
> It's similar to maple etc, does not do a lot of symbolic manipulation, but is
> *very* fast, primarily aimed at number theorists but good for others too. In
> addition to using it as a calculator, one can use PARI routines in C programs;
> it's the latter feature that I'd like to get some help.
> 

..... text deleted.

We have used pari-gp extensively as a stand alone package  as well as 
a library callable from C programs. With minor modifications, we 
were able to port on the Sequent Balance and use it in parallel
C programs. 

  To be able to use PARI in library mode, you need to 

1- #include<genpari.h> 

2- Pari uses  a stack for its internal computation. You have 
to set up the stack size your self. call the init function:

           init(stack_size, num_primes)

the second parameter is the number of primes that PARI would 
pre-compute. A typical stack_size is 1000,000 bytes. 

3- Every PARI object must be of type GEN which is a pointer to long.

4- The simplest way to input and a parse say an input line of the form:
     (x1^3+5*x2)^2+(x+1)/(x+2)


    { char s[buffer_size]; 
      GEN pari_object;
      s[0] = 0; while(!s[0]) gets(s); pari_object = lisexpr(s);
   }

5- To display a pari object in a readable format, use the function
     outbeaut(pari_object);

Let me know if you have any more questions. 

Mohamed


home help back first fref pref prev next nref lref last post