Bill Allombert on Fri, 11 Apr 2003 11:12:43 +0200

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: Using PARI as a library

On Fri, Apr 11, 2003 at 08:53:45AM +0100, Alberto Simões/EPL wrote:
> Hello
> We are developing a tool for Gnome which aims to be (well, to dream is
> free) a Mathematica clone. Of course we know how to program Gtk/Gnome,
> write parsers, evaluate formulae... but we dont have any knowledge of
> algebric/symbolic computation.

PARI is not able to perform symbolic computation with arbitrary
expressions. For example an expression like sin(x+1) will be evaluated
as a power serie. This may not be what you want.

> So, we were looking for a library which could do this for us. I
> downloaded Pari/GP, and it seems a brilliant application... but
> as I read (well, looked to it) the documentation, it seems not so
> easy like that to use Pari library.

I would say it is rather easy:
1) Initialise pari with

2) operation on PARI object is done with
gadd(), gsub(), gmul(), gdiv(). 

> Can anybody point if it can be feasible, or should we adopt GP and
> only do a GUI frontend? (well... I would like to maintain my own
> language and parser...)

I think it is feasible. You may want to look at GP2C. This program
contains a reimplementation of the GP parser in yacc, but would work
as well with a parser for another language, but for the fact it
is suppose to be a compiler for GP :). Also GP2C  can help you
understanding how to program in PARI library.

Be sure to understand PARI memory model and semantic before starting
anything serious based on PARI.