View Single Post
Old 2012-10-28, 05:06   #5
jcrombie
 
jcrombie's Avatar
 
"Jonathan"
Jul 2010
In a tangled web...

3278 Posts
Default

EdH, One problem I see with your program is that there is no pari_init() at the beginning. You need something like:

Code:
  pari_init( 1e9, 1e8 );
before you execute any pari code.

It's also good form to call:

Code:
  pari_close();
at the end.

Another problem is the casts:

Code:
 j=(GEN)100000;
 k=(GEN)200000;
You are assigning integers into pointers here. I really don't know much about pari, but the proper coding techniques are to be found in the "libpari.dvi" documentation.

Cheers

Last fiddled with by jcrombie on 2012-10-28 at 05:11
jcrombie is offline   Reply With Quote