Karim BELABAS on Fri, 27 Oct 2000 12:31:35 +0200 (MET DST) |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: intnum0 |
[Jean-Marc Sac-Epée:] > Could anybody show me an example of C program using intnum0 ? > > I have some problems with the syntax of this function! /* These three lines should be in the common header file paricom.h. * As for now they still stand in src/language/anal.h */ extern entree **functions_hash; /* functions hashtable */ extern entree *is_entry_intern(char *s, entree **table, long *pthash); #define is_entry(s) (is_entry_intern(s,functions_hash,NULL)) /* integrate (smooth) f wrt to variable var, between (small) a and b */ GEN integrate(char *f, char *var, GEN a, GEN b, long prec) { entree *ep_var = is_entry(var); return intnum0(ep_var, a,b, f, 0,prec); } int main() { pari_init(1000000,2); output(integrate("x^2+3", "x", gzero, gun, DEFAULTPREC)); return 0; } Hope this helps, Karim. -- Karim Belabas email: Karim.Belabas@math.u-psud.fr Dep. de Mathematiques, Bat. 425 Universite Paris-Sud Tel: (00 33) 1 69 15 57 48 F-91405 Orsay (France) Fax: (00 33) 1 69 15 60 19 -- PARI/GP Home Page: http://www.parigp-home.de/