A first Cython interface for libgiac

This gives a python class (Pygen) which works with pointer to giac gen. There is a version for python and another one for sage.

The Giac/Xcas Forum is a good place to ask questions about giacpy.

The pure python version: (description)

    Choose the appropirate version : On macosx 10.6 the default python version is 2.6, and for osx 10.7 and 10.8 it is python 2.7. The .pkg files are macosx installer. They require adminitrator rights. If you can't install giacpy from the .pkg files, then you can consider giacpy.dmg. It is a portable version of giacpy and can be installed anywhere. But you will need to adjust your python path. Cf the README file in giacpy.app.

The sage version of giacpy: giacpy_sage

Warning: since sage 7.5 (cf trac20946) the sage version of giacpy is named giacpy_sage

New style spkg of giacpy_sage:

Installation:
giacpy_sage is avaible as an optional spkg since sage 6.8 and has been updated in sage 6.9.beta2

Some differences with the python version of giacpy:

Only: Pygen,libgiac,giacsettings,loadgiacgen are exported by import *. (There are too many words in sage that whould be overwriten. ex gcd...)

The qcas output, htmlhelp are disabled. It has some extra features like Pygen gets sage Integers directly from mpz_t,


Some sage/giacpy Examples :

Examples with giacpy_sage

from giacpy_sage import *
libgiac.ifactor(2**128+1)
x,y=libgiac('x,y')
cos(x+y).texpand()
n=9;R=PolynomialRing(QQ,n,'x');
I = sage.rings.ideal.Katsura(R,n);
I.gens()
time B = I.groebner_basis("libsingular:std") # to compute with singular. about 18s on my notebook.
giacsettings.proba_epsilon=1e-15;
Igiac=libgiac(I.gens());
time Bgiac=Igiac.gbasis([R.gens()],'revlex') # about 3s on my notebook
simplify(Bgiac[-1]/B[0])
giacsettings.proba_epsilon=0; # impose deterministic algorithm
Igiac=libgiac(I.gens());
time Bgiac=Igiac.gbasis([R.gens()],'revlex') # about 25s on my notebook
simplify(Bgiac[-1]/B[0]) # a big constant

Or if your sage is too old or you want a particular version of giacpy:

then download the latest giacpy source for sage and do:


sage setup.py install

or if you want a local install:


sage setup.py build_ext --inplace

and in sage do:

import sys; sys.path.add('/home/fred/giacpy-sage')
from giacpy import *
libgiac.ifactor(2^128+1)


Last modified: Sat Nov 19 18:08:28 CET 2016