|Bill Allombert on Sat, 29 Jun 2002 20:16:33 +0200|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
|GP2C 0.0.1pl2 released|
Hello PARI lovers, I just released GP2C 0.0.1pl2, the GP to C translator. You can download it at <ftp://megrez.math.u-bordeaux.fr/pub/pari/GP2C/gp2c-0.0.1pl2.tar.gz> GP2C is a compiler for GP-scripts that output C code to be linked with libpari or instal'ed in GP. GP2C is aimed at generating code in the standard of libpari. It is compatible with PARI/GP 2.1.0 and upward. This programm is in development stage, but is already usable. It comes with a manual (online version at <http://www.math.u-bordeaux.fr/~allomber/gp2c>) which include a tutorial. It can be used to make GP scripts faster by compiling them, but alternatively you can use it to check for bugs in scripts, with the option -W, or to learn how to program with libpari, by looking at the ouput. It is reasonnably easy to use with the script gp2c-run that allows to compile a script and add the compiled version to a new GP session automatically. This version can be configured with ./configure --with-paricfg=/path/to/dft.Config.in that only need the dft.Config.in script produced by PARI's Configure instead of the full PARI source tree. An example of use: I want to compile the example file pari/examples/rho.gp ./gp2c-run pari/examples/rho.gp I get a new GP session which know about the compiled functions in rho.gp realprecision = 28 significant digits seriesprecision = 16 significant terms format = g0.28 parisize = 4000000, primelimit = 500000 ? rhobrent(3329135824898644601) %1 = 378776543 ? ## *** last result computed in 160 ms. The non compiled function would take more than one second. Cheers, Bill.