/* Copyright (C) 2019 Alessandro Languasco */ /*-*- compile-command: "/usr/bin/gcc -c -o DIFprecS.gp.o -O3 -Wall -fno-strict-aliasing -fomit-frame-pointer -fPIC -I\"/usr/local/include\" DIFprecS.gp.c && /usr/bin/gcc -o DIFprecS.gp.so -bundle -undefined dynamic_lookup -O3 -Wall -fno-strict-aliasing -fomit-frame-pointer -fPIC DIFprecS.gp.o "; -*-*/ #include /* GP;install("my_init_DIFprecS","v","init_DIFprecS","./DIFprecS.gp.so"); GP;install("my_DIFprecS","vD0,G,D0,G,p","DIFprecS","./DIFprecS.gp.so"); */ void my_init_DIFprecS(void); void my_DIFprecS(GEN my_x, GEN my_y, long prec); /*End of prototype*/ int main() { long a, b; GEN x, y; /* pari_init(40000000,0); memory size, primes precomputed*/ pari_init(4000000000,0); /* for cluster computation; memory size, primes precomputed*/ my_init_DIFprecS(); printf("x = "); scanf("%ld",&a); printf("y = "); scanf("%ld",&b); x = stoi(a); y = stoi(b); my_DIFprecS(x,y,ndec2prec(38)); /* ndec2prec(38): converts a number of decimal digits to a number of codewords */ pari_close(); return 0; } /* MAC /usr/bin/gcc DIFm_precS.c DIFprecS.gp.o -g -O3 -Wall -fno-strict-aliasing -fomit-frame-pointer -fPIC -I\"/usr/local/include\" -L/usr/local/lib -lpari -o DIFm_precS.exe pc ufficio /usr/bin/gcc DIFm_precS.c DIFprecS.gp.o -g -O3 -Wall -Wno-unused-result -fno-strict-aliasing -fomit-frame-pointer -fPIC -I\"/usr/local/include\"-lgmp -L/usr/local/lib -lpari -o DIFm_precS.exe */