Annotation of OpenXM_contrib/pari/src/headers/pariport.h, Revision 1.1.1.1
1.1 maekawa 1: /*******************************************************************/
2: /* */
3: /* Fichier Include PARI */
4: /* declarations specifiques portables */
5: /* */
6: /*******************************************************************/
7: /* $Id: pariport.h,v 1.1.1.1 1999/09/16 13:47:45 karim Exp $ */
8:
9: /* mp.c */
10:
11: #define affrs(x,s) (err(affer4))
12: #define affri(x,y) (err(affer5))
13: #define cmpis(x,y) (-cmpsi((y),(x)))
14: #define cmprs(x,y) (-cmpsr((y),(x)))
15: #define cmpri(x,y) (-cmpir((y),(x)))
16: #define subis(x,y) (addsi(-(y),(x)))
17: #define subrs(x,y) (addsr(-(y),(x)))
18:
19: #define divii(a,b) (dvmdii((a),(b),NULL))
20: #define resii(a,b) (dvmdii((a),(b),ONLY_REM))
21:
22: #define mpshift(x,s) ((typ(x)==t_INT)?shifti((x),(s)):shiftr((x),(s)))
23: #define affsz(s,x) ((typ(x)==t_INT)?affsi((s),(x)):affsr((s),(x)))
24: #define mptruncz(x,y) (gop1z(mptrunc,(x),(y)))
25: #define mpentz(x,y) (gop1z(mpent,(x),(y)))
26: #define mpaddz(x,y,z) (gop2z(mpadd,(x),(y),(z)))
27: #define addsiz(s,y,z) (gops2sgz(addsi,(s),(y),(z)))
28: #define addsrz(s,y,z) (gops2sgz(addsr,(s),(y),(z)))
29: #define addiiz(x,y,z) (gop2z(addii,(x),(y),(z)))
30: #define addirz(x,y,z) (gop2z(addir,(x),(y),(z)))
31: #define addriz(x,y,z) (gop2z(addir,(y),(x),(z)))
32: #define addrrz(x,y,z) (gop2z(addrr,(x),(y),(z)))
33: #define mpsubz(x,y,z) (gop2z(mpsub,(x),(y),(z)))
34: #define subss(x,y) (addss(-(y),(x)))
35: #define subssz(x,y,z) (addssz((x),-(y),(z)))
36: #define subsiz(s,y,z) (gops2sgz(subsi,(s),(y),(z)))
37: #define subsrz(x,y,z) {long av=avma; gaffect(subsr((x),(y)),(z)); avma=av; }
38: #define subisz(y,s,z) (gops2sgz(addsi,-(s),(y),(z)))
39: #define subrsz(y,s,z) (gops2sgz(addsr,-(s),(y),(z)))
40: #define subiiz(x,y,z) {long av=avma; gaffect(subii((x),(y)),(z)); avma=av; }
41: #define subirz(x,y,z) {long av=avma; gaffect(subir((x),(y)),(z)); avma=av; }
42: #define subriz(x,y,z) (gop2z(subri,(x),(y),(z)))
43: #define subrrz(x,y,z) {long av=avma; gaffect(subrr((x),(y)),(z)); avma=av; }
44: #define mpmulz(x,y,z) (gop2z(mpmul,(x),(y),(z)))
45: #define mulsiz(s,y,z) (gops2sgz(mulsi,(s),(y),(z)))
46: #define mulsrz(s,y,z) (gops2sgz(mulsr,(s),(y),)(z))
47: #define muliiz(x,y,z) (gop2z(mulii,(x),(y),(z)))
48: #define mulirz(x,y,z) (gop2z(mulir,(x),(y),(z)))
49: #define mulriz(x,y,z) (gop2z(mulir,(y),(x),(z)))
50: #define mulrrz(x,y,z) (gop2z(mulrr,(x),(y),(z)))
51: #define mpinvsr(s,y) (divssz(1,(s),(y)))
52: #define mpinvir(x,y) (divsiz(1,(x),(y)))
53: #define mpinvrr(x,y) (divsrz(1,(x),(y)))
54: #define mpdvmdz(x,y,z,t) (dvmdiiz((x),(y),(z),(t)))
55: #define modssz(s,y,z) (gops2ssz(modss,(s),(y),(z)))
56: #define modsiz(s,y,z) (gops2sgz(modsi,(s),(y),(z)))
57: #define modisz(y,s,z) (gops2gsz(modis,(y),(s),(z)))
58: #define ressiz(s,y,z) (gops2sgz(ressi,(s),(y),(z)))
59: #define resisz(y,s,z) (gops2gsz(resis,(y),(s),(z)))
60: #define resssz(s,y,z) (gops2ssz(resss,(s),(y),(z)))
61: #define divirz(x,y,z) (gop2z(divir,(x),(y),(z)))
62: #define divriz(x,y,z) (gop2z(divri,(x),(y),(z)))
63: #define divsrz(s,y,z) (gops2sgz(divsr,(s),(y),(z)))
64: #define divrsz(y,s,z) (gops2gsz(divrs,(y),(s),(z)))
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>