[BACK]Return to ca.h CVS log [TXT][DIR] Up to [local] / OpenXM_contrib2 / asir2000 / include

Diff for /OpenXM_contrib2/asir2000/include/ca.h between version 1.18 and 1.33

version 1.18, 2001/07/03 01:41:26 version 1.33, 2002/01/28 00:54:43
Line 45 
Line 45 
  * DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE,   * DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE,
  * PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE.   * PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE.
  *   *
  * $OpenXM: OpenXM_contrib2/asir2000/include/ca.h,v 1.17 2001/06/25 04:11:43 noro Exp $   * $OpenXM: OpenXM_contrib2/asir2000/include/ca.h,v 1.32 2001/12/25 02:39:03 noro Exp $
 */  */
 #include <stdio.h>  #include <stdio.h>
   
Line 58 
Line 58 
 #include <stdlib.h>  #include <stdlib.h>
 #endif  #endif
   
   #if !defined(VISUAL)
   #include <sys/param.h>
   #endif
   
 #if defined(linux) || (defined(sun) && !defined(SYSV)) || defined(news5000) || (defined(mips) && defined(ultrix))  #if defined(linux) || (defined(sun) && !defined(SYSV)) || defined(news5000) || (defined(mips) && defined(ultrix))
 #include <alloca.h>  #include <alloca.h>
 #endif  #endif
Line 121  typedef void * pointer;
Line 125  typedef void * pointer;
 #define N_GF2N 7  #define N_GF2N 7
 #define N_GFPN 8  #define N_GFPN 8
 #define N_GFS 9  #define N_GFS 9
   #define N_GFSN 10
   
 #define ORD_REVGRADLEX 0  #define ORD_REVGRADLEX 0
 #define ORD_GRADLEX 1  #define ORD_GRADLEX 1
Line 246  typedef struct oGFS {
Line 251  typedef struct oGFS {
         int cont;          int cont;
 } *GFS;  } *GFS;
   
   typedef struct oGFSN {
           short id;
           char nid;
           char pad;
           struct oUM *body;
   } *GFSN;
   
 typedef struct oP {  typedef struct oP {
         short id;          short id;
Line 360  typedef struct oDL {
Line 371  typedef struct oDL {
         int d[1];          int d[1];
 } *DL;  } *DL;
   
   struct dp_pairs {
           int dp1, dp2;
           DL lcm;
           int sugar;
           struct dp_pairs *next;
   };
   
   typedef struct dp_pairs *DP_pairs;
   
   struct p_pair {
           struct oUM *p0;
           struct oUM *p1;
           struct p_pair *next;
   };
   
   struct oMF {
           int m;
           P f;
   };
   
   /*
    * compressed DP
    */
   
   typedef struct oCDP {
           int len;
           int psindex;
           unsigned int *body;
   } *CDP;
   
   typedef struct oCM {
           int index;
           int c;
   } *CM;
   
   /* bucket list for DL */
   
   typedef struct oDLBUCKET {
           int td;
           struct oNODE *body;
           struct oDLBUCKET *next;
   } *DLBUCKET;
   
 typedef struct oVL {  typedef struct oVL {
         V v;          V v;
         struct oVL *next;          struct oVL *next;
Line 451  struct oEGT {
Line 505  struct oEGT {
 #define FF_GF2N 2  #define FF_GF2N 2
 #define FF_GFPN 3  #define FF_GFPN 3
 #define FF_GFS 4  #define FF_GFS 4
   #define FF_GFSN 5
   
 /* include interval.h */  /* include interval.h */
 #include "interval.h"  #include "interval.h"
Line 466  typedef unsigned int ModNum;
Line 521  typedef unsigned int ModNum;
 #endif  #endif
   
 /* general macros */  /* general macros */
   #if defined(MAX)
   #undef MAX
   #endif
   #if defined(MIN)
   #undef MIN
   #endif
 #define MAX(a,b) ((a) > (b) ? (a) : (b) )  #define MAX(a,b) ((a) > (b) ? (a) : (b) )
 #define MIN(a,b) ((a) > (b) ? (b) : (a) )  #define MIN(a,b) ((a) > (b) ? (b) : (a) )
 #ifdef ABS  #ifdef ABS
Line 505  typedef unsigned int ModNum;
Line 566  typedef unsigned int ModNum;
 #endif  #endif
 #define CALLOC(d,e) MALLOC((d)*(e))  #define CALLOC(d,e) MALLOC((d)*(e))
   
 #if (defined(__GNUC__) || defined(vax) || defined(apollo) || defined(alloca) || defined(VISUAL))  #if !defined(__CYGWIN__) && (defined(__GNUC__) || defined(vax) || defined(apollo) || defined(alloca) || defined(VISUAL))
 #define ALLOCA(d) alloca(d)  #define ALLOCA(d) alloca(d)
 #else  #else
 #define ALLOCA(d) MALLOC(d)  #define ALLOCA(d) MALLOC(d)
 #endif  #endif
   
   /* for setjmp/longjmp compatibility */
   #if defined(__CYGWIN__)
   #define JMP_BUF sigjmp_buf
   #define SETJMP(x) sigsetjmp(x,~0)
   #define LONGJMP(x,y) siglongjmp(x,y)
   #else
   #define JMP_BUF jmp_buf
   #define SETJMP(x) setjmp(x)
   #define LONGJMP(x,y) longjmp(x,y)
   #endif
   
 #define TRUESIZE(type,n,atype) (sizeof(struct type)+MAX((n),0)*sizeof(atype))  #define TRUESIZE(type,n,atype) (sizeof(struct type)+MAX((n),0)*sizeof(atype))
 #define NALLOC(d) ((N)MALLOC_ATOMIC(TRUESIZE(oN,(d)-1,int)))  #define NALLOC(d) ((N)MALLOC_ATOMIC(TRUESIZE(oN,(d)-1,int)))
 #define UMALLOC(d) ((UM)MALLOC(TRUESIZE(oUM,d,int)))  #define UMALLOC(d) ((UM)MALLOC(TRUESIZE(oUM,d,int)))
Line 566  bzero((char *)(q)->b,(w)*sizeof(unsigned int)))
Line 638  bzero((char *)(q)->b,(w)*sizeof(unsigned int)))
 #define NEWQ(q) ((q)=(Q)MALLOC(sizeof(struct oQ)),OID(q)=O_N,NID(q)=N_Q)  #define NEWQ(q) ((q)=(Q)MALLOC(sizeof(struct oQ)),OID(q)=O_N,NID(q)=N_Q)
 #define NEWMQ(q) ((q)=(MQ)MALLOC_ATOMIC(sizeof(struct oMQ)),OID(q)=O_N,NID(q)=N_M)  #define NEWMQ(q) ((q)=(MQ)MALLOC_ATOMIC(sizeof(struct oMQ)),OID(q)=O_N,NID(q)=N_M)
 #define NEWGFS(q) ((q)=(GFS)MALLOC_ATOMIC(sizeof(struct oGFS)),OID(q)=O_N,NID(q)=N_GFS)  #define NEWGFS(q) ((q)=(GFS)MALLOC_ATOMIC(sizeof(struct oGFS)),OID(q)=O_N,NID(q)=N_GFS)
   #define NEWGFSN(q) ((q)=(GFSN)MALLOC(sizeof(struct oGFSN)),OID(q)=O_N,NID(q)=N_GFSN)
 #define NEWP(p) ((p)=(P)MALLOC(sizeof(struct oP)),OID(p)=O_P)  #define NEWP(p) ((p)=(P)MALLOC(sizeof(struct oP)),OID(p)=O_P)
 #define NEWR(r) ((r)=(R)MALLOC(sizeof(struct oR)),OID(r)=O_R,(r)->reduced=0)  #define NEWR(r) ((r)=(R)MALLOC(sizeof(struct oR)),OID(r)=O_R,(r)->reduced=0)
 #define NEWLIST(l) ((l)=(LIST)MALLOC(sizeof(struct oLIST)),OID(l)=O_LIST)  #define NEWLIST(l) ((l)=(LIST)MALLOC(sizeof(struct oLIST)),OID(l)=O_LIST)
Line 584  bzero((char *)(q)->b,(w)*sizeof(unsigned int)))
Line 657  bzero((char *)(q)->b,(w)*sizeof(unsigned int)))
 #define NEWV(v) ((v)=(V)MALLOC(sizeof(struct oV)))  #define NEWV(v) ((v)=(V)MALLOC(sizeof(struct oV)))
 #define NEWVL(vl) ((vl)=(VL)MALLOC(sizeof(struct oVL)))  #define NEWVL(vl) ((vl)=(VL)MALLOC(sizeof(struct oVL)))
 #define NEWMP(m) ((m)=(MP)MALLOC(sizeof(struct oMP)))  #define NEWMP(m) ((m)=(MP)MALLOC(sizeof(struct oMP)))
   #define NEWDLBUCKET(a) ((a)=(DLBUCKET)MALLOC(sizeof(struct oDLBUCKET)))
   #define NEWDPP(a) ((a)=(DP_pairs)MALLOC(sizeof(struct dp_pairs)))
   
 #define NEWMAT(l) ((l)=(MAT)MALLOC(sizeof(struct oMAT)),OID(l)=O_MAT)  #define NEWMAT(l) ((l)=(MAT)MALLOC(sizeof(struct oMAT)),OID(l)=O_MAT)
 #define NEWGF2MAT(l) ((l)=(GF2MAT)MALLOC(sizeof(struct oGF2MAT)),OID(l)=O_GF2MAT)  #define NEWGF2MAT(l) ((l)=(GF2MAT)MALLOC(sizeof(struct oGF2MAT)),OID(l)=O_GF2MAT)
Line 639  if(!(r)){NEWNODE(r);(c)=(r);}else{NEWNODE(NEXT(c));(c)
Line 714  if(!(r)){NEWNODE(r);(c)=(r);}else{NEWNODE(NEXT(c));(c)
 if(!(r)){NEWMP(r);(c)=(r);}else{NEWMP(NEXT(c));(c)=NEXT(c);}  if(!(r)){NEWMP(r);(c)=(r);}else{NEWMP(NEXT(c));(c)=NEXT(c);}
 #define NEXTMP2(r,c,s) \  #define NEXTMP2(r,c,s) \
 if(!(r)){(c)=(r)=(s);}else{NEXT(c)=(s);(c)=(s);}  if(!(r)){(c)=(r)=(s);}else{NEXT(c)=(s);(c)=(s);}
   #define NEXTDLBUCKET(r,c) \
   if(!(r)){NEWDLBUCKET(r);(c)=(r);}else{NEWDLBUCKET(NEXT(c));(c)=NEXT(c);}
   #define NEXTVL(r,c) \
   if(!(r)){NEWVL(r);(c)=(r);}else{NEWVL(NEXT(c));(c)=NEXT(c);}
   #define NEXTDPP(r,c) \
   if(!(r)){NEWDPP(r);(c)=(r);}else{NEWDPP(NEXT(c));(c)=NEXT(c);}
   
 /* convertors */  /* convertors */
 #define NTOQ(n,s,q) \  #define NTOQ(n,s,q) \
Line 655  PL(NM(q))=1,BD(NM(q))[0]=ABS(n),DN(q)=0,(q)))
Line 736  PL(NM(q))=1,BD(NM(q))[0]=ABS(n),DN(q)=0,(q)))
 ((a)?(NEWMQ(b),CONT(b)=(unsigned int)(a),(b)):((b)=0))  ((a)?(NEWMQ(b),CONT(b)=(unsigned int)(a),(b)):((b)=0))
 #define MKGFS(a,b) \  #define MKGFS(a,b) \
 ((NEWGFS(b),CONT(b)=(a),(b)))  ((NEWGFS(b),CONT(b)=(a),(b)))
   #define MKGFSN(a,b) \
   ((DEG(a)>=0)?(NEWGFSN(b),BDY(b)=(a),(b)):((b)=0))
 #define STOMQ(a,b) \  #define STOMQ(a,b) \
 ((a)?(NEWMQ(b),CONT(b)=(a),(b)):((b)=0))  ((a)?(NEWMQ(b),CONT(b)=(a),(b)):((b)=0))
 #define UTON(u,n) \  #define UTON(u,n) \
Line 682  PL(NM(q))=1,BD(NM(q))[0]=(unsigned int)(n),DN(q)=0,(q)
Line 765  PL(NM(q))=1,BD(NM(q))[0]=(unsigned int)(n),DN(q)=0,(q)
 /* predicates */  /* predicates */
 #define NUM(p) (OID(p)==O_N)  #define NUM(p) (OID(p)==O_N)
 #define RAT(p) (OID(p)==O_R)  #define RAT(p) (OID(p)==O_R)
 #define INT(q) (!DN((Q)q))  
 #define RATN(a) (NID(a)==N_Q)  #define RATN(a) (NID(a)==N_Q)
   #define INT(q) (!(q)||(NUM(q)&&RATN((Num)q)&&!DN((Q)q)))
 #define REAL(a) (NID(a)==N_R)  #define REAL(a) (NID(a)==N_R)
 #define BIGFLOAT(a) (NID(a)==N_B)  #define BIGFLOAT(a) (NID(a)==N_B)
 #define SFF(a) (NID(a)==N_M)  #define SFF(a) (NID(a)==N_M)
Line 698  PL(NM(q))=1,BD(NM(q))[0]=(unsigned int)(n),DN(q)=0,(q)
Line 781  PL(NM(q))=1,BD(NM(q))[0]=(unsigned int)(n),DN(q)=0,(q)
   
 #define NV(p) ((p)->nv)  #define NV(p) ((p)->nv)
 #define C(p) ((p)->c)  #define C(p) ((p)->c)
   #if 0
 #define ITOS(p) (((unsigned int)(p))&0x7fffffff)  #define ITOS(p) (((unsigned int)(p))&0x7fffffff)
 #define STOI(i) ((P)((unsigned int)(i)|0x80000000))  #define STOI(i) ((P)((unsigned int)(i)|0x80000000))
   #else
   #define ITOS(p) (((unsigned int)(p)))
   #define STOI(i) ((P)((unsigned int)(i)))
   #endif
   
 /* immediate GFS representation */  /* immediate GFS representation */
   
Line 736  if(!(r)){(c)=(r)=(s);}else{NEXT(c)=(s);(c)=(s);}
Line 824  if(!(r)){(c)=(r)=(s);}else{NEXT(c)=(s);(c)=(s);}
 #define _FREEMP(m) NEXT(m)=_mp_free_list; _mp_free_list=(m)  #define _FREEMP(m) NEXT(m)=_mp_free_list; _mp_free_list=(m)
 #define _FREEDP(m) BDY(m)=(MP)_dp_free_list; _dp_free_list=(m)  #define _FREEDP(m) BDY(m)=(MP)_dp_free_list; _dp_free_list=(m)
   
   #define MUL_WEIGHT(a,i) (current_dl_weight_vector?(a)*current_dl_weight_vector[i]:(a))
   
 /* externals */  /* externals */
 #if 0  #if 0
 double NatToReal();  double NatToReal();
Line 778  extern void (*pwrnumt[])();
Line 868  extern void (*pwrnumt[])();
 extern int (*cmpnumt[])();  extern int (*cmpnumt[])();
 extern void (*chsgnnumt[])();  extern void (*chsgnnumt[])();
   
   extern int current_mod;
   extern GEN_UP2 current_mod_gf2n;
   extern int lm_lazy;
   extern int current_ff;
   extern V up_var;
   extern V up2_var;
   extern P current_gfs_ext;
   extern int current_gfs_p;
   extern int current_gfs_q;
   extern int current_gfs_q1;
   extern int *current_gfs_plus1;
   extern int *current_gfs_ntoi;
   extern int *current_gfs_iton;
   
   extern int *current_dl_weight_vector;
   
 /* prototypes */  /* prototypes */
 int compui(VL,USINT,USINT);  int compui(VL,USINT,USINT);
 int compbytearray(VL,BYTEARRAY,BYTEARRAY);  int compbytearray(VL,BYTEARRAY,BYTEARRAY);
Line 1171  int geldb(VL,P);
Line 1277  int geldb(VL,P);
 int getchomdeg(V,P);  int getchomdeg(V,P);
 int getdeg(V,P);  int getdeg(V,P);
 int getlchomdeg(V,P,int *);  int getlchomdeg(V,P,int *);
   int get_lprime(int);
 int homdeg(P);  int homdeg(P);
 unsigned int invm(unsigned int,int);  unsigned int invm(unsigned int,int);
 int iscycm(P);  int iscycm(P);
Line 1185  int nmonop(P);
Line 1292  int nmonop(P);
 int pcoef(VL,VL,P,P *);  int pcoef(VL,VL,P,P *);
 int pcoef0(VL,VL,P,P *);  int pcoef0(VL,VL,P,P *);
 unsigned int pwrm(register int,register int,int);  unsigned int pwrm(register int,register int,int);
 unsigned int rem(N,unsigned int);  unsigned int rem(N,int);
 int sqfrchk(P);  int sqfrchk(P);
 int subn(N,N,N *);  int subn(N,N,N *);
 int ucmpp(P,P);  int ucmpp(P,P);
Line 1216  void chsgngfs(GFS,GFS *);
Line 1323  void chsgngfs(GFS,GFS *);
 void pwrgfs(GFS,Q, GFS *);  void pwrgfs(GFS,Q, GFS *);
 int cmpgfs(GFS,GFS);  int cmpgfs(GFS,GFS);
   
   void addgfsn(GFSN,GFSN,GFSN *);
   void subgfsn(GFSN,GFSN,GFSN *);
   void mulgfsn(GFSN,GFSN,GFSN *);
   void divgfsn(GFSN,GFSN,GFSN *);
   void chsgngfsn(GFSN,GFSN *);
   void pwrgfsn(GFSN,Q, GFSN *);
   int cmpgfsn(GFSN,GFSN);
   
 void addalg(Num,Num,Num *);  void addalg(Num,Num,Num *);
 void addbf(Num,Num,Num *);  void addbf(Num,Num,Num *);
 void addcplx(Num,Num,Num *);  void addcplx(Num,Num,Num *);
Line 1240  void addlm(LM,LM,LM *);
Line 1355  void addlm(LM,LM,LM *);
 void addstr(VL,STRING,STRING,STRING *);  void addstr(VL,STRING,STRING,STRING *);
 void addum(int,UM,UM,UM);  void addum(int,UM,UM,UM);
 void addvect(VL,VECT,VECT,VECT *);  void addvect(VL,VECT,VECT,VECT *);
   void addquote(VL,QUOTE,QUOTE,QUOTE *);
 void adjc(VL,P,P,P,Q,P *,P *);  void adjc(VL,P,P,P,Q,P *,P *);
 void afctr(VL,P,P,DCP *);  void afctr(VL,P,P,DCP *);
 void afctrmain(VL,P,P,int,DCP *);  void afctrmain(VL,P,P,int,DCP *);
Line 1263  void chsgnreal(Num,Num *);
Line 1379  void chsgnreal(Num,Num *);
 void chsgnmi(MQ,MQ *);  void chsgnmi(MQ,MQ *);
 void chsgnlm(LM,LM *);  void chsgnlm(LM,LM *);
 void chsgnvect(VECT,VECT *);  void chsgnvect(VECT,VECT *);
   void chsgnquote(QUOTE,QUOTE *);
 void clctv(VL,P,VL *);  void clctv(VL,P,VL *);
 void clctvr(VL,Obj,VL *);  void clctvr(VL,Obj,VL *);
 void cm2p(Q,Q,P,P *);  void cm2p(Q,Q,P,P *);
Line 1304  void divsrdcp(VL,P,P,P *,P *);
Line 1421  void divsrdcp(VL,P,P,P *,P *);
 void divsrmp(VL,int,P,P,P *,P *);  void divsrmp(VL,int,P,P,P *,P *);
 void divsrp(VL,P,P,P *,P *);  void divsrp(VL,P,P,P *,P *);
 void divvect(VL,Obj,Obj,Obj *);  void divvect(VL,Obj,Obj,Obj *);
   void divquote(VL,QUOTE,QUOTE,QUOTE *);
 void dtest(P,ML,int,DCP *);  void dtest(P,ML,int,DCP *);
 void dtestroot(int,int,P,LUM,struct oDUM *,DCP *);  void dtestroot(int,int,P,LUM,struct oDUM *,DCP *);
 void dtestroot1(int,int,P,LUM,P *);  void dtestroot1(int,int,P,LUM,P *);
Line 1399  void mulsgn(VN,VN,int,VN);
Line 1517  void mulsgn(VN,VN,int,VN);
 void mulsum(register int,UM,register int,UM);  void mulsum(register int,UM,register int,UM);
 void mulum(register int,UM,UM,UM);  void mulum(register int,UM,UM,UM);
 void mulvect(VL,Obj,Obj,Obj *);  void mulvect(VL,Obj,Obj,Obj *);
   void mulquote(VL,QUOTE,QUOTE,QUOTE *);
 void mulvectmat(VL,VECT,MAT,VECT *);  void mulvectmat(VL,VECT,MAT,VECT *);
 void next(VN);  void next(VN);
 void nezgcdnp_sqfr_primitive(VL,P,P *,int,P *);  void nezgcdnp_sqfr_primitive(VL,P,P *,int,P *);
Line 1444  void pwrnum(VL,Num,Num,Num *);
Line 1563  void pwrnum(VL,Num,Num,Num *);
 void pwrp(VL,P,Q,P *);  void pwrp(VL,P,Q,P *);
 void pwrq(Q,Q,Q *);  void pwrq(Q,Q,Q *);
 void pwrr(VL,Obj,Obj,Obj *);  void pwrr(VL,Obj,Obj,Obj *);
   void pwrquote(VL,QUOTE,QUOTE,QUOTE *);
 void pwrreal(Num,Num,Real *);  void pwrreal(Num,Num,Real *);
 void pwrmi(MQ,Q,MQ *);  void pwrmi(MQ,Q,MQ *);
 void pwrlm(LM,Q,LM *);  void pwrlm(LM,Q,LM *);
Line 1502  void substp(VL,P,V,P,P *);
Line 1622  void substp(VL,P,V,P,P *);
 void substvp(VL,P,VN,P *);  void substvp(VL,P,VN,P *);
 void subum(int,UM,UM,UM);  void subum(int,UM,UM,UM);
 void subvect(VL,VECT,VECT,VECT *);  void subvect(VL,VECT,VECT,VECT *);
   void subquote(VL,QUOTE,QUOTE,QUOTE *);
 void toreim(Num,Num *,Num *);  void toreim(Num,Num *,Num *);
 void ucsump(P,Q *);  void ucsump(P,Q *);
 void udivpwm(Q,P,P,P *,P *);  void udivpwm(Q,P,P,P *,P *);
Line 1517  void umtomp(V,UM,P *);
Line 1638  void umtomp(V,UM,P *);
 void umtop(V,UM,P *);  void umtop(V,UM,P *);
 void usqp(P,DCP *);  void usqp(P,DCP *);
 void vntovl(VN,int,VL *);  void vntovl(VN,int,VL *);
   
   void saveerror(FILE *,ERR);
   void saveui(FILE *,USINT);
   void savedp(FILE *,DP);
   void savestring(FILE *,STRING);
   void savemat(FILE *,MAT);
   void savevect(FILE *,VECT);
   void savelist(FILE *,LIST);
   void saver(FILE *,R);
   void savep(FILE *,P);
   void savegf2n(FILE *,GF2N);
   void savegfpn(FILE *,GFPN);
   void savegfs(FILE *,GFS);
   void savelm(FILE *,LM);
   void savemi(FILE *,MQ);
   void savecplx(FILE *,C);
   void savebf(FILE *,BF);
   void savereal(FILE *,Real);
   void saveq(FILE *,Q);
   void savenum(FILE *,Num);
   void savepfins(FILE *,V);
   void savegfmmat(FILE *,GFMMAT);
   void savebytearray(FILE *,BYTEARRAY);
   void savegfsn(FILE *,GFSN);
   
   void loaderror(FILE *,ERR *);
   void loadui(FILE *,USINT *);
   void loaddp(FILE *,DP *);
   void loadstring(FILE *,STRING *);
   void loadmat(FILE *,MAT *);
   void loadvect(FILE *,VECT *);
   void loadlist(FILE *,LIST *);
   void loadr(FILE *,R *);
   void loadp(FILE *,P *);
   void loadgf2n(FILE *,GF2N *);
   void loadgfpn(FILE *,GFPN *);
   void loadgfs(FILE *,GFS *);
   void loadgfsn(FILE *,GFSN *);
   void loadlm(FILE *,LM *);
   void loadmi(FILE *,MQ *);
   void loadcplx(FILE *,C *);
   void loadbf(FILE *,BF *);
   void loadreal(FILE *,Real *);
   void loadq(FILE *,Q *);
   void loadnum(FILE *,Num *);
   void loadgfmmat(FILE *,GFMMAT *);
   void loadbytearray(FILE *,BYTEARRAY *);
   V loadpfins(FILE *);
   void eucum2(int mod,UM f1,UM f2,UM a,UM b);
   void clearum(UM p,int n);
   BM BMALLOC(int dx,int dy);
   int isequalum(UM f1,UM f2);
   void dec_um(int p,int a,UM u);
   void setmod_sf(int p,int n);
   int search_defpoly_and_primitive_root(int p,int n,UM dp);
   void generate_defpoly_um(int p,int n,UM dp);
   int generate_primitive_root_enc(int p,int n,UM dp);
   int mulremum_enc(int p,int n,UM dp,int a,int b);
   void gfs_galois_action(GFS a,Q e,GFS *c);
   void gfs_embed(GFS z,int k,int pm,GFS *c);
   void qtogfs(Q a,GFS *c);
   void mqtogfs(MQ a,GFS *c);
   void gfstomq(GFS a,MQ *c);
   void ntogfs(Obj a,GFS *b);
   void addgfs(GFS a,GFS b,GFS *c);
   void subgfs(GFS a,GFS b,GFS *c);
   void mulgfs(GFS a,GFS b,GFS *c);
   void divgfs(GFS a,GFS b,GFS *c);
   void chsgngfs(GFS a,GFS *c);
   void pwrgfs(GFS a,Q b,GFS *c);
   int cmpgfs(GFS a,GFS b);
   void randomgfs(GFS *r);
   int _addsf(int a,int b);
   int _chsgnsf(int a);
   int _subsf(int a,int b);
   int _mulsf(int a,int b);
   int _invsf(int a);
   int _divsf(int a,int b);
   int _pwrsf(int a,int b);
   int _onesf();
   int _itosf(int n);
   int _isonesf(int a);
   int _randomsf();
   int field_order_sf();
   int characteristic_sf();
   int extdeg_sf();
   void addsfum(UM p1,UM p2,UM pr);
   void subsfum(UM p1,UM p2,UM pr);
   void gcdsfum(UM p1,UM p2,UM pr);
   void mulsfum(UM p1,UM p2,UM pr);
   void mulssfum(UM p,int n,UM pr);
   void kmulsfum(UM n1,UM n2,UM nr);
   void kmulsfummain(UM n1,UM n2,UM nr);
   int divsfum(UM p1,UM p2,UM pq);
   void diffsfum(UM f,UM fd);
   void monicsfum(UM f);
   int compsfum(UM a,UM b);
   void mulsfbm(BM f1,BM f2,BM fr);
   int degbm(BM f);
   void addtosfbm(BM f,BM g);
   void eucsfum(UM f1,UM f2,UM a,UM b);
   void shiftsfum(UM f,int a,UM g);
   void shiftsflum(int n,LUM f,int ev);
   void shiftsfbm(BM f,int a);
   void clearbm(int n,BM f);
   
   void ksquareum(int mod,UM n1,UM nr);
   void extractum(UM n,int index,int len,UM nr);
   void copyum(UM n1,UM n2);
   void c_copyum(UM n,int len,int *p);
   void kmulummain(int mod,UM n1,UM n2,UM nr);
   void ksquareummain(int mod,UM n1,UM nr);
   
   void simp_ff(Obj p,Obj *rp);
   void field_order_ff(N *order);
   
   void random_lm(LM *r);
   void ntosparsen(N p,N *bits);
   void setmod_lm(N p);
   void getmod_lm(N *p);
   void simplm(LM n,LM *r);
   void qtolm(Q q,LM *l);
   void addlm(LM a,LM b,LM *c);
   void sublm(LM a,LM b,LM *c);
   void mullm(LM a,LM b,LM *c);
   void divlm(LM a,LM b,LM *c);
   void chsgnlm(LM a,LM *c);
   void pwrlm(LM a,Q b,LM *c);
   void pwrlm0(N a,N n,N *c);
   int cmplm(LM a,LM b);
   void remn_special(N,N,int,unsigned int ,N *);;
   void gen_simpn(N a,N *b);
   void gen_simpn_force(N a,N *b);
   void setmod_gfpn(P p);
   void getmod_gfpn(UP *up);
   void ptogfpn(Obj q,GFPN *l);
   void gfpntop(GFPN q,P *l);
   void simpgfpn(GFPN n,GFPN *r);
   void ntogfpn(Obj a,GFPN *b);
   void addgfpn(GFPN a,GFPN b,GFPN *c);
   void subgfpn(GFPN a,GFPN b,GFPN *c);
   void mulgfpn(GFPN a,GFPN b,GFPN *c);
   void squaregfpn(GFPN a,GFPN *c);
   void divgfpn(GFPN a,GFPN b,GFPN *c);
   void invgfpn(GFPN b,GFPN *c);
   void chsgngfpn(GFPN a,GFPN *c);
   void pwrgfpn(GFPN a,Q b,GFPN *c);
   int cmpgfpn(GFPN a,GFPN b);
   void randomgfpn(GFPN *r);
   void setmod_gfsn(UM p);
   void getmod_gfsn(UM *up);
   void simpgfsn(GFSN n,GFSN *r);
   void ntogfsn(Obj a,GFSN *b);
   void addgfsn(GFSN a,GFSN b,GFSN *c);
   void subgfsn(GFSN a,GFSN b,GFSN *c);
   void mulgfsn(GFSN a,GFSN b,GFSN *c);
   void divgfsn(GFSN a,GFSN b,GFSN *c);
   void invgfsn(GFSN b,GFSN *c);
   void chsgngfsn(GFSN a,GFSN *c);
   void pwrgfsn(GFSN a,Q b,GFSN *c);
   int cmpgfsn(GFSN a,GFSN b);
   void randomgfsn(GFSN *r);
   void setmod_gf2n(P p);
   void getmod_gf2n(UP2 *p);
   void simpgf2n(GF2N n,GF2N *r);
   void ptogf2n(Obj q,GF2N *l);
   void gf2ntop(GF2N q,P *l);
   void gf2ntovect(GF2N q,VECT *l);
   void addgf2n(GF2N a,GF2N b,GF2N *c);
   void subgf2n(GF2N a,GF2N b,GF2N *c);
   void mulgf2n(GF2N a,GF2N b,GF2N *c);
   void squaregf2n(GF2N a,GF2N *c);
   void divgf2n(GF2N a,GF2N b,GF2N *c);
   void invgf2n(GF2N b,GF2N *c);
   void chsgngf2n(GF2N a,GF2N *c);
   void pwrgf2n(GF2N a,Q b,GF2N *c);
   int cmpgf2n(GF2N a,GF2N b);
   void randomgf2n(GF2N *r);
   void binaryton(char *binary,N *np);
   void hexton(char *hex,N *np);
   void ntobn(int base,N n,N *nrp);
   void bnton(int base,N n,N *nrp);
   void ptomp(int m,P p,P *pr);
   void mptop(P f,P *gp);
   void ptosfp(P p,P *pr);
   void sfptop(P f,P *gp);
   void sf_galois_action(P p,Q e,P *pr);
   void sf_embed(P p,int k,int pm,P *pr);
   void ptolmp(P p,P *pr);
   void lmptop(P f,P *gp);
   void ptoum(int m,P f,UM wf);
   void umtop(V v,UM w,P *f);
   void ptosfum(P f,UM wf);
   void sfumtop(V v,UM w,P *f);
   void ptoup(P n,UP *nr);
   void uptop(UP n,P *nr);
   void ulmptoum(int m,UP f,UM wf);
   void objtobobj(int base,Obj p,Obj *rp);
   void bobjtoobj(int base,Obj p,Obj *rp);
   void numtobnum(int base,Num p,Num *rp);
   void bnumtonum(int base,Num p,Num *rp);
   void ptobp(int base,P p,P *rp);
   void bptop(int base,P p,P *rp);
   void listtoblist(int base,LIST p,LIST *rp);
   void blisttolist(int base,LIST p,LIST *rp);
   void vecttobvect(int base,VECT p,VECT *rp);
   void bvecttovect(int base,VECT p,VECT *rp);
   void mattobmat(int base,MAT p,MAT *rp);
   void bmattomat(int base,MAT p,MAT *rp);
   void n32ton27(N g,N *rp);
   void n27ton32(N a,N *rp);
   void mptoum(P p,UM pr);
   void umtomp(V v,UM p,P *pr);
   void enc_to_p(int p,int a,V v,P *pr);
   int comp_dum(DUM a,DUM b);
   void fctrsf(P p,DCP *dcp);
   void gensqfrsfum(UM p,struct oDUM *dc);
   void randsfum(int d,UM p);
   void pwrmodsfum(UM p,int e,UM f,UM pr);
   void spwrsfum(UM m,UM f,N e,UM r);
   void tracemodsfum(UM m,UM f,int e,UM r);
   void make_qmatsf(UM p,UM *tab,int ***mp);
   void nullsf(int **mat,int n,int *ind);
   void null_to_solsf(int **mat,int *ind,int n,UM *r);
   void czsfum(UM f,UM *r);
   int berlekampsf(UM p,int df,UM *tab,UM *r);
   void minipolysf(UM f,UM p,UM mp);
   int find_rootsf(UM p,int *root);
   void canzassf(UM f,int d,UM *r);
   void sfhensel(int count,P f,V x,int degbound,GFS *evp,P *sfp,ML *listp);
   int sfberle(VL vl,P f,int count,GFS *ev,DCP *dcp);
   void sfgcdgen(P f,ML blist,ML *clistp);
   void sfhenmain2(BM f,UM g0,UM h0,int dy,BM *gp);
   void ptosfbm(int dy,P f,BM fl);
   void sfbmtop(BM f,V x,V y,P *fp);
   void sfsqfr(P f,DCP *dcp);
   void sfusqfr(P f,DCP *dcp);
   void sfbsqfr(P f,V x,V y,DCP *dcp);
   void sfbfctr(P f,V x,V y,int degbound,DCP *dcp);
   void sfdtest(P f,ML list,V x,V y,DCP *dcp);
   int sfdtestmain(VL vl,P lcg,UM lcg0,BM lcy,P csum,ML list,
           int k,int *in,P *fp,P *cofp);
   void const_term(P f,UM c);
   void const_term_sfbm(BM f,UM c);
   int sfctest(UM lcg0,BM lcy,ML list,int k,int *in);
   void mulsfbmarray(int dx,BM lcy,ML list,int k,int *in,V x,V y,P *g);
   void sfcsump(VL vl,P f,P *s);
   void cont_pp_sfp(VL vl,P f,P *cp,P *fp);
   int divtp_by_sfbm(VL vl,P f,P g,P *qp);
   void generate_defpoly_sfum(int n,UM *dp);
   NODE symb_merge(NODE,NODE,int);
   void _free_private_storage();
   void _DL_alloc();
   void _MP_alloc();
   void _DP_alloc();
   void _addmd_destructive(int mod,DP p1,DP p2,DP *pr);
   void _mulmd_dup(int mod,DP p1,DP p2,DP *pr);
   void _comm_mulmd_dup(int mod,DP p1,DP p2,DP *pr);
   void _weyl_mulmd_dup(int mod,DP p1,DP p2,DP *pr);
   void _mulmdm_dup(int mod,DP p,MP m0,DP *pr);
   void _weyl_mulmdm_dup(int mod,MP m0,DP p,DP *pr);
   void _weyl_mulmmm_dup(int mod,MP m0,MP m1,int n,struct cdlm *rtab,int rtablen);
   void _comm_mulmd_tab(int mod,int nv,struct cdlm *t,int n,struct cdlm *t1,int n1,struct cdlm *rt);
   void _comm_mulmd_tab_destructive(int mod,int nv,struct cdlm *t,int n,struct cdlm *t1,int n1);
   void dlto_dl(DL d,DL *dr);
   void _dltodl(DL d,DL *dr);
   void _adddl_dup(int n,DL d1,DL d2,DL *dr);
   void _free_dlarray(DL *a,int n);
   void _free_dp(DP f);
   void dpto_dp(DP p,DP *r);
   void _dptodp(DP p,DP *r);
   NODE _symb_merge(NODE m1,NODE m2,int n);
   void _addd_destructive(VL vl,DP p1,DP p2,DP *pr);
   void _muld_dup(VL vl,DP p1,DP p2,DP *pr);
   void _comm_muld_dup(VL vl,DP p1,DP p2,DP *pr);
   void _weyl_muld_dup(VL vl,DP p1,DP p2,DP *pr);
   void _muldm_dup(VL vl,DP p,MP m0,DP *pr);
   void _weyl_muldm_dup(VL vl,MP m0,DP p,DP *pr);
   void _weyl_mulmm_dup(VL vl,MP m0,MP m1,int n,struct cdl *rtab,int rtablen);
   void _comm_muld_tab(VL vl,int nv,struct cdl *t,int n,struct cdl *t1,int n1,struct cdl *rt);
   void _comm_muld_tab_destructive(VL vl,int nv,struct cdl *t,int n,struct cdl *t1,int n1);
   
   int has_fcoef(DP f);
   int has_fcoef_p(P f);
   void initd(struct order_spec *spec);
   void ptod(VL vl,VL dvl,P p,DP *pr);
   void dtop(VL vl,VL dvl,DP p,P *pr);
   void nodetod(NODE node,DP *dp);
   int sugard(MP m);
   void addd(VL vl,DP p1,DP p2,DP *pr);
   void symb_addd(DP p1,DP p2,DP *pr);
   NODE symb_merge(NODE m1,NODE m2,int n);
   DLBUCKET symb_merge_bucket(DLBUCKET m1,DLBUCKET m2,int n);
   void subd(VL vl,DP p1,DP p2,DP *pr);
   void chsgnd(DP p,DP *pr);
   void muld(VL vl,DP p1,DP p2,DP *pr);
   void comm_muld(VL vl,DP p1,DP p2,DP *pr);
   void muldm(VL vl,DP p,MP m0,DP *pr);
   void weyl_muld(VL vl,DP p1,DP p2,DP *pr);
   void weyl_muldm(VL vl,MP m0,DP p,DP *pr);
   void weyl_mulmm(VL vl,MP m0,MP m1,int n,struct cdl *rtab,int rtablen);
   void comm_muld_tab(VL vl,int nv,struct cdl *t,int n,struct cdl *t1,int n1,struct cdl *rt);
   void muldc(VL vl,DP p,P c,DP *pr);
   void divsdc(VL vl,DP p,P c,DP *pr);
   void adddl(int n,DL d1,DL d2,DL *dr);
   void adddl_destructive(int n,DL d1,DL d2);
   int compd(VL vl,DP p1,DP p2);
   int cmpdl_lex(int n,DL d1,DL d2);
   int cmpdl_revlex(int n,DL d1,DL d2);
   int cmpdl_gradlex(int n,DL d1,DL d2);
   int cmpdl_revgradlex(int n,DL d1,DL d2);
   int cmpdl_blex(int n,DL d1,DL d2);
   int cmpdl_bgradlex(int n,DL d1,DL d2);
   int cmpdl_brevgradlex(int n,DL d1,DL d2);
   int cmpdl_brevrev(int n,DL d1,DL d2);
   int cmpdl_bgradrev(int n,DL d1,DL d2);
   int cmpdl_blexrev(int n,DL d1,DL d2);
   int cmpdl_elim(int n,DL d1,DL d2);
   int cmpdl_weyl_elim(int n,DL d1,DL d2);
   int cmpdl_homo_ww_drl(int n,DL d1,DL d2);
   int cmpdl_order_pair(int n,DL d1,DL d2);
   int cmpdl_matrix(int n,DL d1,DL d2);
   void ptomd(VL vl,int mod,VL dvl,P p,DP *pr);
   void mptomd(VL vl,int mod,VL dvl,P p,DP *pr);
   void mdtop(VL vl,int mod,VL dvl,DP p,P *pr);
   void addmd(VL vl,int mod,DP p1,DP p2,DP *pr);
   void submd(VL vl,int mod,DP p1,DP p2,DP *pr);
   void chsgnmd(int mod,DP p,DP *pr);
   void mulmd(VL vl,int mod,DP p1,DP p2,DP *pr);
   void comm_mulmd(VL vl,int mod,DP p1,DP p2,DP *pr);
   void weyl_mulmd(VL vl,int mod,DP p1,DP p2,DP *pr);
   void mulmdm(VL vl,int mod,DP p,MP m0,DP *pr);
   void weyl_mulmdm(VL vl,int mod,DP p,MP m0,DP *pr);
   void weyl_mulmmm(VL vl,int mod,MP m0,MP m1,int n,DP *pr);
   void mulmdc(VL vl,int mod,DP p,P c,DP *pr);
   void divsmdc(VL vl,int mod,DP p,P c,DP *pr);
   void _dtop_mod(VL vl,VL dvl,DP p,P *pr);
   void _dp_mod(DP p,int mod,NODE subst,DP *rp);
   void _dp_monic(DP p,int mod,DP *rp);
   void _printdp(DP d);
   void addmd_destructive(int mod,DP p1,DP p2,DP *pr);
   void mulmd_dup(int mod,DP p1,DP p2,DP *pr);
   void comm_mulmd_dup(int mod,DP p1,DP p2,DP *pr);
   void weyl_mulmd_dup(int mod,DP p1,DP p2,DP *pr);
   void mulmdm_dup(int mod,DP p,MP m0,DP *pr);
   void weyl_mulmdm_dup(int mod,MP m0,DP p,DP *pr);
   void weyl_mulmmm_dup(int mod,MP m0,MP m1,int n,struct cdlm *rtab,int rtablen);
   void comm_mulmd_tab_destructive(int mod,int nv,struct cdlm *t,int n,struct cdlm *t1,int n1);
   void adddl_dup(int n,DL d1,DL d2,DL *dr);
   void monicup(UP a,UP *b);
   void simpup(UP a,UP *b);
   void simpnum(Num a,Num *b);
   void uremp(P p1,P p2,P *rp);
   void ugcdp(P p1,P p2,P *rp);
   void reversep(P p1,Q d,P *rp);
   void invmodp(P p1,Q d,P *rp);
   void addup(UP n1,UP n2,UP *nr);
   void subup(UP n1,UP n2,UP *nr);
   void chsgnup(UP n1,UP *nr);
   void hybrid_mulup(int ff,UP n1,UP n2,UP *nr);
   void hybrid_squareup(int ff,UP n1,UP *nr);
   void hybrid_tmulup(int ff,UP n1,UP n2,int d,UP *nr);
   void mulup(UP n1,UP n2,UP *nr);
   void mulcup(Num c,UP n1,UP *nr);
   void tmulup(UP n1,UP n2,int d,UP *nr);
   void squareup(UP n1,UP *nr);
   void remup(UP n1,UP n2,UP *nr);
   void remup_destructive(UP n1,UP n2);
   void qrup(UP n1,UP n2,UP *nq,UP *nr);
   void qrup_destructive(UP n1,UP n2);
   void gcdup(UP n1,UP n2,UP *nr);
   void extended_gcdup(UP a,UP m,UP *r);
   void reverseup(UP n1,int d,UP *nr);
   void invmodup(UP n1,int d,UP *nr);
   void pwrup(UP n,Q e,UP *nr);
   int compup(UP n1,UP n2);
   void kmulp(VL vl,P n1,P n2,P *nr);
   void ksquarep(VL vl,P n1,P *nr);
   void kmulup(UP n1,UP n2,UP *nr);
   void ksquareup(UP n1,UP *nr);
   void copyup(UP n1,UP n2);
   void c_copyup(UP n,int len,pointer *p);
   void kmulupmain(UP n1,UP n2,UP *nr);
   void ksquareupmain(UP n1,UP *nr);
   void rembymulup(UP n1,UP n2,UP *nr);
   void hybrid_rembymulup_special(int ff,UP n1,UP n2,UP inv2,UP *nr);
   void rembymulup_special(UP n1,UP n2,UP inv2,UP *nr);
   void tkmulup(UP n1,UP n2,int d,UP *nr);
   void shiftup(UP n,int d,UP *nr);
   void fft_rembymulup_special(UP n1,UP n2,UP inv2,UP *nr);
   void set_degreeup(UP n,int d);
   void decompup(UP n,int d,UP *n0,UP *n1);
   void truncup(UP n1,int d,UP *nr);
   int int_bits(int t);
   int maxblenup(UP n);
   void uptofmarray(int mod,UP n,ModNum *f);
   void fmarraytoup(ModNum *f,int d,UP *nr);
   void uiarraytoup(unsigned int **f,int n,int d,UP *nr);
   void adj_coefup(UP n,N m,N m2,UP *nr);
   void remcup(UP n,N mod,UP *nr);
   void fft_mulup(UP n1,UP n2,UP *nr);
   void trunc_fft_mulup(UP n1,UP n2,int dbd,UP *nr);
   void fft_squareup(UP n1,UP *nr);
   void fft_mulup_main(UP n1,UP n2,int dbd,UP *nr);
   void crup(ModNum **f,int d,int *mod,int index,N m,UP *r);
   void fft_mulup_specialmod_main(UP n1,UP n2,int dbd,int *modind,int nmod,UP *nr);
   void divn(N n1,N n2,N *nq,N *nr);
   void divsn(N n1,N n2,N *nq);
   void remn(N n1,N n2,N *nr);
   void remn_special(N a,N d,int bits,unsigned int lower,N *b);
   void mulin(N n,unsigned int d,unsigned int *p);
   unsigned int divin(N n,unsigned int dvr,N *q);
   void bprintn(N n);
   void bxprintn(N n);
   void muln(N n1,N n2,N *nr);
   void _muln(N n1,N n2,N nr);
   void muln_1(unsigned int *p,int s,unsigned int d,unsigned int *r);
   void divnmain(int d1,int d2,unsigned int *m1,unsigned int *m2,unsigned int *q);
   void divnmain_special(int d1,int d2,unsigned int *m1,unsigned int *m2,unsigned int *q);
   unsigned int divn_1(unsigned int *p,int s,unsigned int d,unsigned int *r);
   void addn(N n1,N n2,N *nr);
   int subn(N n1,N n2,N *nr);
   void _addn(N n1,N n2,N nr);
   int _subn(N n1,N n2,N nr);
   void addarray_to(unsigned int *a1,int n1,unsigned int *a2,int n2);
   void pwrn(N n,int e,N *nr);
   void gcdn(N n1,N n2,N *nr);
   void gcdEuclidn(N n1,N n2,N *nr);
   int cmpn(N n1,N n2);
   void bshiftn(N n,int b,N *r);
   void shiftn(N n,int w,N *r);
   void randomn(int bits,N *r);
   void freen(N n);
   int n_bits(N n);
   void fft_mulup_lm(UP n1,UP n2,UP *nr);
   void fft_squareup_lm(UP n1,UP *nr);
   void trunc_fft_mulup_lm(UP n1,UP n2,int dbd,UP *nr);
   void crup_lm(ModNum **f,int d,int *mod,int index,N m,N lm_mod,UP *r);
   void fft_rembymulup_special_lm(UP n1,UP n2,UP inv2,UP *nr);
   void uptolmup(UP n,UP *nr);
   void save_up(UP obj,char *name);
   void hybrid_powermodup(UP f,UP *xp);
   void powermodup(UP f,UP *xp);
   void hybrid_generic_powermodup(UP g,UP f,Q d,UP *xp);
   void generic_powermodup(UP g,UP f,Q d,UP *xp);
   void hybrid_powertabup(UP f,UP xp,UP *tab);
   void powertabup(UP f,UP xp,UP *tab);
   void squarep_gf2n(VL vl,P n1,P *nr);
   void squareup_gf2n(UP n1,UP *nr);
   void powermodup_gf2n(UP f,UP *xp);
   void generic_powermodup_gf2n(UP g,UP f,Q d,UP *xp);
   void tracemodup_gf2n(UP g,UP f,Q d,UP *xp);
   void tracemodup_gf2n_slow(UP g,UP f,Q d,UP *xp);
   void tracemodup_gf2n_tab(UP g,UP f,Q d,UP *xp);
   void square_rem_tab_up_gf2n(UP f,UP *tab,UP *rp);
   void powertabup_gf2n(UP f,UP xp,UP *tab);
   void find_root_gf2n(UP f,GF2N *r);
   void ptoup2(P n,UP2 *nr);
   void ptoup2_sparse(P n,UP2 *nr);
   void up2top(UP2 n,P *nr);
   void up2tovect(UP2 n,VECT *nr);
   void up2ton(UP2 p,Q *n);
   void ntoup2(Q n,UP2 *p);
   void gen_simpup2(UP2 p,GEN_UP2 m,UP2 *r);
   void gen_simpup2_destructive(UP2 p,GEN_UP2 m);
   void gen_invup2(UP2 p,GEN_UP2 m,UP2 *r);
   void gen_pwrmodup2(UP2 a,Q b,GEN_UP2 m,UP2 *c);
   void simpup2(UP2 p,UP2 m,UP2 *r);
   int degup2(UP2 a);
   int degup2_sparse(UP2 a);
   int degup2_1(unsigned int a);
   void addup2(UP2 a,UP2 b,UP2 *c);
   void subup2(UP2 a,UP2 b,UP2 *c);
   void _mulup2_1(UP2 a,unsigned int b,UP2 c);
   void _mulup2_h(UP2 a,unsigned int b,UP2 c);
   void mulup2(UP2 a,UP2 b,UP2 *c);
   void _kmulup2_(unsigned int *a,unsigned int *b,int w,unsigned int *c);
   void _mulup2_nn(unsigned int *a,unsigned int *b,int w,unsigned int *c);
   void _mulup2(UP2 a,UP2 b,UP2 c);
   void _mulup2_(_UP2 a,_UP2 b,_UP2 c);
   void squareup2(UP2 n,UP2 *nr);
   void _squareup2(UP2 n,UP2 nr);
   void _adjup2(UP2 n);
   void _adjup2_(_UP2 n);
   void _addup2(UP2 a,UP2 b,UP2 c);
   void _addup2_destructive(UP2 a,UP2 b);
   void _addup2_(_UP2 a,_UP2 b,_UP2 c);
   void _addtoup2_(_UP2 a,_UP2 b);
   unsigned int mulup2_bb(unsigned int a,unsigned int b);
   void init_up2_tab();
   void divup2_1(unsigned int a1,unsigned int a2,int e1,int e2,unsigned int *qp,unsigned int *rp);
   void qrup2(UP2 a,UP2 b,UP2 *q,UP2 *r);
   void _qrup2(UP2 a,UP2 b,UP2 q,UP2 r);
   void remup2(UP2 a,UP2 b,UP2 *c);
   void _remup2(UP2 a,UP2 b,UP2 c);
   void remup2_sparse(UP2 a,UP2 b,UP2 *c);
   void remup2_sparse_destructive(UP2 a,UP2 b);
   void remup2_type1_destructive(UP2 a,int d);
   void remup2_3_destructive(UP2 a,UP2 b);
   void remup2_5_destructive(UP2 a,UP2 b);
   void _invup2_1(unsigned int f1,unsigned int f2,unsigned int *a1,unsigned int *b1);
   void _gcdup2_1(unsigned int f1,unsigned int f2,unsigned int *gcd);
   void up2_init_eg();
   void up2_show_eg();
   void invup2(UP2 a,UP2 m,UP2 *inv);
   void gcdup2(UP2 a,UP2 m,UP2 *gcd);
   void chsgnup2(UP2 a,UP2 *c);
   void pwrmodup2(UP2 a,Q b,UP2 m,UP2 *c);
   void pwrmodup2_sparse(UP2 a,Q b,UP2 m,UP2 *c);
   int compup2(UP2 n1,UP2 n2);
   void _copyup2(UP2 n,UP2 r);
   void _bshiftup2(UP2 n,int b,UP2 r);
   void _bshiftup2_destructive(UP2 n,int b);
   void diffup2(UP2 f,UP2 *r);
   int sqfrcheckup2(UP2 f);
   int irredcheckup2(UP2 f);
   int irredcheck_dddup2(UP2 f);
   void _copy_up2bits(UP2 p,unsigned int **mat,int pos);
   int compute_multiplication_matrix(P p0,GF2MAT *mp);
   void compute_change_of_basis_matrix(P p0,P p1,int to,GF2MAT *m01,GF2MAT *m10);
   void compute_change_of_basis_matrix_with_root(P p0,P p1,int to,GF2N root,GF2MAT *m01,GF2MAT *m10);
   int compute_representation_conversion_matrix(P p0,GF2MAT *np,GF2MAT *pn);
   void mul_nb(GF2MAT mat,unsigned int *a,unsigned int *b,unsigned int *c);
   void leftshift(unsigned int *a,int n);
   void mat_to_gf2mat(MAT a,unsigned int ***b);
   void gf2mat_to_mat(unsigned int **a,int n,MAT *b);
   void mulgf2mat(int n,unsigned int **a,unsigned int **b,unsigned int **c);
   void mulgf2vectmat(int n,unsigned int *a,unsigned int **b,unsigned int *c);
   int mulgf2vectvect(int n,unsigned int *a,unsigned int *b);
   int invgf2mat(int n,unsigned int **a,unsigned int **b);
   void _mulup2_22(unsigned int *a1,unsigned int *a2,unsigned int *ar);
   void _mulup2_33(unsigned int *a1,unsigned int *a2,unsigned int *ar);
   void _mulup2_44(unsigned int *a1,unsigned int *a2,unsigned int *ar);
   void _mulup2_55(unsigned int *a1,unsigned int *a2,unsigned int *ar);
   void _mulup2_66(unsigned int *a1,unsigned int *a2,unsigned int *ar);
   void type1_bin_invup2(UP2 a,int n,UP2 *inv);
   UP2 *compute_tab_gf2n(UP2 f);
   UP compute_trace_gf2n(UP2 *tab,GF2N c,int n);
   void up2toup(UP2 f,UP *r);
   void find_root_up2(UP2 f,GF2N *r);
   void addq(Q n1,Q n2,Q *nr);
   void subq(Q n1,Q n2,Q *nr);
   void mulq(Q n1,Q n2,Q *nr);
   void divq(Q n1,Q n2,Q *nq);
   void divsq(Q n1,Q n2,Q *nq);
   void invq(Q n,Q *nr);
   void chsgnq(Q n,Q *nr);
   void pwrq(Q n1,Q n,Q *nr);
   int cmpq(Q q1,Q q2);
   void remq(Q n,Q m,Q *nr);
   void mkbc(int n,Q *t);
   void mkwc(int k,int l,Q *t);
   void mkwcm(int k,int l,int m,int *t);
   void factorial(int n,Q *r);
   void invl(Q a,Q mod,Q *ar);
   void kmuln(N n1,N n2,N *nr);
   void extractn(N n,int index,int len,N *nr);
   void copyn(N n,int len,int *p);
   void dupn(N n,N p);
   void kmulnmain(N n1,N n2,N *nr);
   void plisttop(P *f,V v,int n,P *gp);
   int divtp(VL vl,P p1,P p2,P *q);
   int divtdcp(VL vl,P p1,P p2,P *q);
   int divtpz(VL vl,P p1,P p2,P *q);
   int divtdcpz(VL vl,P p1,P p2,P *q);
   void udivpz(P f1,P f2,P *fqp,P *frp);
   void udivpwm(Q mod,P p1,P p2,P *q,P *r);
   void udivpzwm(Q mod,P f1,P f2,P *fqp,P *frp);
   void henmv(VL vl,VN vn,P f,P g0,P h0,P a0,P b0,P lg,P lh,P lg0,P lh0,Q q,int k,P *gp,P *hp);
   void henmvmain(VL vl,VN vn,P f,P fi0,P fi1,P gi0,P gi1,P l0,P l1,Q mod,Q mod2,int k,P *fr0,P *fr1);
   void henzq(P f,P i0,UM fi0,P i1,UM fi1,int p,int k,P *fr0p,P *fr1p,P *gr0p,P *gr1p,Q *qrp);
   void henzq1(P g,P h,Q bound,P *gcp,P *hcp,Q *qp);
   void addm2p(VL vl,Q mod,Q mod2,P n1,P n2,P *nr);
   void subm2p(VL vl,Q mod,Q mod2,P n1,P n2,P *nr);
   void mulm2p(VL vl,Q mod,Q mod2,P n1,P n2,P *nr);
   void cmp(Q mod,P p,P *pr);
   void cm2p(Q mod,Q m,P p,P *pr);
   void addm2q(Q mod,Q mod2,Q n1,Q n2,Q *nr);
   void subm2q(Q mod,Q mod2,Q n1,Q n2,Q *nr);
   void mulm2q(Q mod,Q mod2,Q n1,Q n2,Q *nr);
   void rem2q(Q n,Q m,Q m2,Q *nr);
   void exthpc_generic(VL vl,P p,int d,V v,P *pr);
   void exthp(VL vl,P p,int d,P *pr);
   void exthpc(VL vl,V v,P p,int d,P *pr);
   void cbound(VL vl,P p,Q *b);
   int geldb(VL vl,P p);
   int getdeg(V v,P p);
   void cmax(P p,Q *b);
   int nextbin(VN vn,int n);
   void mulsgn(VN vn,VN vnt,int n,VN vn1);
   void next(VN vn);
   void clctv(VL vl,P p,VL *nvlp);
   void markv(VN vn,int n,P p);
   void vntovl(VN vn,int n,VL *vlp);
   int dbound(V v,P f);
   int homdeg(P f);
   int minhomdeg(P f);
   void adjc(VL vl,P f,P a,P lc0,Q q,P *fr,P *ar);
   void affinemain(VL vl,P p,V v0,int n,P *pl,P *pr);
   void restore(VL vl,P f,VN vn,P *fr);
   void mergev(VL vl,VL vl1,VL vl2,VL *nvlp);
   void substvp(VL vl,P f,VN vn,P *g);
   void affine(VL vl,P f,VN vn,P *fr);
   void addnum(VL vl,Num a,Num b,Num *c);
   void subnum(VL vl,Num a,Num b,Num *c);
   void mulnum(VL vl,Num a,Num b,Num *c);
   void divnum(VL vl,Num a,Num b,Num *c);
   void pwrnum(VL vl,Num a,Num b,Num *c);
   void chsgnnum(Num a,Num *c);
   int compnum(VL vl,Num a,Num b);
   void one_ff(Num *c);
   int negative_number(Num c);
   void simp_ff(Obj p,Obj *rp);
   void field_order_ff(N *order);
   int fft_available(int d1,int n1,int d2,int n2);
   void get_fft_prime(int index,int *p,int *d);
   void nglob_init();
   void get_eg(struct oEGT *p);
   void init_eg(struct oEGT *eg);
   void add_eg(struct oEGT *base,struct oEGT *start,struct oEGT *end);
   void print_eg(char *item,struct oEGT *eg);
   void print_split_eg(struct oEGT *start,struct oEGT *end);
   void print_split_e(struct oEGT *start,struct oEGT *end);
   void suspend_timer() ;
   void resume_timer() ;
   void reset_engine() ;
   unsigned int get_asir_version() ;
   char *get_asir_distribution();
   void create_error(ERR *err,unsigned int serial,char *msg);
   void init_lprime();
   int get_lprime(int index);
   void create_new_lprimes(int index);
   void reorderp(VL nvl,VL ovl,P p,P *pr);
   void substp(VL vl,P p,V v0,P p0,P *pr);
   void detp(VL vl,P **rmat,int n,P *dp);
   void invmatp(VL vl,P **rmat,int n,P ***imatp,P *dnp);
   void reordvar(VL vl,V v,VL *nvlp);
   void gcdprsp(VL vl,P p1,P p2,P *pr);
   void gcdcp(VL vl,P p,P *pr);
   void sprs(VL vl,V v,P p1,P p2,P *pr);
   void resultp(VL vl,V v,P p1,P p2,P *pr);
   void srch2(VL vl,V v,P p1,P p2,P *pr);
   void srcr(VL vl,V v,P p1,P p2,P *pr);
   void res_ch_det(VL vl,V v,P p1,P p2,P *pr);
   void res_detmp(VL vl,int mod,V v,P p1,P p2,P *dp);
   void premp(VL vl,P p1,P p2,P *pr);
   void ptozp0(P p,P *pr);
   void mindegp(VL vl,P p,VL *mvlp,P *pr);
   void maxdegp(VL vl,P p,VL *mvlp,P *pr);
   void min_common_vars_in_coefp(VL vl,P p,VL *mvlp,P *pr);
   void minlcdegp(VL vl,P p,VL *mvlp,P *pr);
   void sort_by_deg(int n,P *p,P *pr);
   void sort_by_deg_rev(int n,P *p,P *pr);
   void getmindeg(V v,P p,Q *dp);
   void minchdegp(VL vl,P p,VL *mvlp,P *pr);
   int getchomdeg(V v,P p);
   int getlchomdeg(V v,P p,int *d);
   int nmonop(P p);
   int qpcheck(Obj p);
   int uzpcheck(Obj p);
   int p_mag(P p);
   int maxblenp(P p);
   void berle(int index,int count,P f,ML *listp);
   int berlecnt(int mod,UM f);
   int berlecntmain(int mod,int n,int m,int **c);
   UM *berlemain(int mod,UM f,UM *fp);
   void hensel(int index,int count,P f,ML *listp);
   void hensel2(int index,int count,P f,ML *listp);
   void henmain2(LUM f,UM g0,UM h0,UM a0,UM b0,int m,int bound,LUM *gp);
   void clearlum(int n,int bound,LUM f);
   void addtolum(int m,int bound,LUM f,LUM g);
   void hsq(int index,int count,P f,int *nindex,DCP *dcp);
   void gcdgen(P f,ML blist,ML *clistp);
   void henprep2(int mod,int q,int k,UM f,UM g,UM h,UM qg,UM qh,UM qa,UM qb);
   void henprep(P f,ML blist,ML clist,ML *bqlistp,ML *cqlistp);
   void henmain(LUM f,ML bqlist,ML cqlist,ML *listp);
   int mignotte(int q,P f);
   int mig(int q,int d,P f);
   void sqad(unsigned int man,int exp);
   void ptolum(int q,int bound,P f,LUM fl);
   void modfctrp(P p,int mod,int flag,DCP *dcp);
   void gensqfrum(int mod,UM p,struct oDUM *dc);
   void ddd(int mod,UM f,UM *r);
   void canzas(int mod,UM f,int d,UM *base,UM *r);
   void randum(int mod,int d,UM p);
   void pwrmodum(int mod,UM p,int e,UM f,UM pr);
   void spwrum(int mod,UM m,UM *base,UM f,N e,UM r);
   void spwrum0(int mod,UM m,UM f,N e,UM r);
   void mult_mod_tab(UM p,int mod,UM *tab,UM r,int d);
   void make_qmat(UM p,int mod,UM *tab,int ***mp);
   void null_mod(int **mat,int mod,int n,int *ind);
   void null_to_sol(int **mat,int *ind,int mod,int n,UM *r);
   void newddd(int mod,UM f,UM *r);
   int nfctr_mod(UM f,int mod);
   int irred_check(UM f,int mod);
   int berlekamp(UM p,int mod,int df,UM *tab,UM *r);
   void minipoly_mod(int mod,UM f,UM p,UM mp);
   void lnf_mod(int mod,int n,UM p0,UM p1,struct p_pair *list,UM np0,UM np1);
   void showum(UM p);
   void showumat(int **mat,int n);
   int find_root(int mod,UM p,int *root);
   void fctrp(VL vl,P f,DCP *dcp);
   void fctr_wrt_v_p(VL vl,P f,V v,DCP *dcp);
   void homfctr(VL vl,P g,DCP *dcp);
   void mfctr(VL vl,P f,DCP *dcp);
   void mfctr_wrt_v(VL vl,P f,V v,DCP *dcp);
   void adjsgn(P p,DCP dc);
   int headsgn(P p);
   void fctrwithmvp(VL vl,P f,V v,DCP *dcp);
   void mfctrwithmv(VL vl,P f,V v,DCP *dcp);
   void ufctr(P f,int hint,DCP *dcp);
   void mfctrmain(VL vl,P p,DCP *dcp);
   void ufctrmain(P p,int hint,DCP *dcp);
   void cycm(V v,int n,DCP *dcp);
   void cycp(V v,int n,DCP *dcp);
   void calcphi(V v,int n,struct oMF *mfp);
   void mkssum(V v,int e,int s,int sgn,P *r);
   int iscycp(P f);
   int iscycm(P f);
   void sortfs(DCP *dcp);
   void sortfsrev(DCP *dcp);
   void nthrootchk(P f,struct oDUM *dc,ML fp,DCP *dcp);
   void sqfrp(VL vl,P f,DCP *dcp);
   void msqfr(VL vl,P f,DCP *dcp);
   void usqp(P f,DCP *dcp);
   void msqfrmain(VL vl,P p,DCP *dcp);
   void msqfrmainmain(VL vl,P p,VN vn,P p0,DCP dc0,DCP *dcp,P *pp);
   void mfctrhen2(VL vl,VN vn,P f,P f0,P g0,P h0,P lcg,P lch,P *gp);
   int sqfrchk(P p);
   int cycchk(P p);
   int zerovpchk(VL vl,P p,VN vn);
   int valideval(VL vl,DCP dc,VN vn);
   void estimatelc(VL vl,Q c,DCP dc,VN vn,P *lcp);
   void monomialfctr(VL vl,P p,P *pr,DCP *dcp);
   void afctr(VL vl,P p0,P p,DCP *dcp);
   void afctrmain(VL vl,P p0,P p,int init,DCP *dcp);
   int divtmp(VL vl,int mod,P p1,P p2,P *q);
   int divtdcmp(VL vl,int mod,P p1,P p2,P *q);
   void GC_gcollect();
   
 #if 0 && !defined(VISUAL)  #if 0 && !defined(VISUAL)
 void bzero(const void *,int);  void bzero(const void *,int);

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.33

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>