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

Annotation of OpenXM_contrib2/asir2000/include/ca.h, Revision 1.30

1.4       noro        1: /*
                      2:  * Copyright (c) 1994-2000 FUJITSU LABORATORIES LIMITED
                      3:  * All rights reserved.
                      4:  *
                      5:  * FUJITSU LABORATORIES LIMITED ("FLL") hereby grants you a limited,
                      6:  * non-exclusive and royalty-free license to use, copy, modify and
                      7:  * redistribute, solely for non-commercial and non-profit purposes, the
                      8:  * computer program, "Risa/Asir" ("SOFTWARE"), subject to the terms and
                      9:  * conditions of this Agreement. For the avoidance of doubt, you acquire
                     10:  * only a limited right to use the SOFTWARE hereunder, and FLL or any
                     11:  * third party developer retains all rights, including but not limited to
                     12:  * copyrights, in and to the SOFTWARE.
                     13:  *
                     14:  * (1) FLL does not grant you a license in any way for commercial
                     15:  * purposes. You may use the SOFTWARE only for non-commercial and
                     16:  * non-profit purposes only, such as academic, research and internal
                     17:  * business use.
                     18:  * (2) The SOFTWARE is protected by the Copyright Law of Japan and
                     19:  * international copyright treaties. If you make copies of the SOFTWARE,
                     20:  * with or without modification, as permitted hereunder, you shall affix
                     21:  * to all such copies of the SOFTWARE the above copyright notice.
                     22:  * (3) An explicit reference to this SOFTWARE and its copyright owner
                     23:  * shall be made on your publication or presentation in any form of the
                     24:  * results obtained by use of the SOFTWARE.
                     25:  * (4) In the event that you modify the SOFTWARE, you shall notify FLL by
1.5       noro       26:  * e-mail at risa-admin@sec.flab.fujitsu.co.jp of the detailed specification
1.4       noro       27:  * for such modification or the source code of the modified part of the
                     28:  * SOFTWARE.
                     29:  *
                     30:  * THE SOFTWARE IS PROVIDED AS IS WITHOUT ANY WARRANTY OF ANY KIND. FLL
                     31:  * MAKES ABSOLUTELY NO WARRANTIES, EXPRESSED, IMPLIED OR STATUTORY, AND
                     32:  * EXPRESSLY DISCLAIMS ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS
                     33:  * FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT OF THIRD PARTIES'
                     34:  * RIGHTS. NO FLL DEALER, AGENT, EMPLOYEES IS AUTHORIZED TO MAKE ANY
                     35:  * MODIFICATIONS, EXTENSIONS, OR ADDITIONS TO THIS WARRANTY.
                     36:  * UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, TORT, CONTRACT,
                     37:  * OR OTHERWISE, SHALL FLL BE LIABLE TO YOU OR ANY OTHER PERSON FOR ANY
                     38:  * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, PUNITIVE OR CONSEQUENTIAL
                     39:  * DAMAGES OF ANY CHARACTER, INCLUDING, WITHOUT LIMITATION, DAMAGES
                     40:  * ARISING OUT OF OR RELATING TO THE SOFTWARE OR THIS AGREEMENT, DAMAGES
                     41:  * FOR LOSS OF GOODWILL, WORK STOPPAGE, OR LOSS OF DATA, OR FOR ANY
                     42:  * DAMAGES, EVEN IF FLL SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF
                     43:  * SUCH DAMAGES, OR FOR ANY CLAIM BY ANY OTHER PARTY. EVEN IF A PART
                     44:  * OF THE SOFTWARE HAS BEEN DEVELOPED BY A THIRD PARTY, THE THIRD PARTY
                     45:  * DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE,
                     46:  * PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE.
                     47:  *
1.30    ! noro       48:  * $OpenXM: OpenXM_contrib2/asir2000/include/ca.h,v 1.29 2001/10/09 01:36:19 noro Exp $
1.4       noro       49: */
1.1       noro       50: #include <stdio.h>
                     51:
                     52: #if defined(hpux)
                     53: #include <netinet/in.h>
                     54: # define setbuffer(FP,buf,siz) setvbuf(FP,buf,_IOFBF,siz)
                     55: #endif
                     56:
                     57: #if defined(VISUAL)
                     58: #include <stdlib.h>
                     59: #endif
                     60:
1.28      noro       61: #if !defined(VISUAL)
                     62: #include <sys/param.h>
                     63: #endif
                     64:
1.1       noro       65: #if defined(linux) || (defined(sun) && !defined(SYSV)) || defined(news5000) || (defined(mips) && defined(ultrix))
                     66: #include <alloca.h>
                     67: #endif
                     68:
                     69: #if (defined(sun) && defined(SYSV))
                     70: #define alloca(x) __builtin_alloca(x)
                     71: #endif
                     72:
                     73: #if defined(VISUAL)
                     74: #include <malloc.h>
                     75: #endif
                     76:
                     77: #if 0
                     78: #include <sys/types.h>
                     79: typedef caddr_t pointer;
                     80: #endif
                     81:
                     82: typedef void * pointer;
                     83:
                     84: #if defined(VISUAL)
                     85: #include <string.h>
                     86: #define index(s,c) strchr(s,c)
                     87: #define bzero(s,len) memset(s,0,len)
                     88: #define bcopy(x,y,len) memcpy(y,x,len)
                     89: #endif
                     90:
                     91: #define COPY(a,b) ((b)=(a))
                     92: #define FREEN(p)
                     93: #define FREEQ(p)
                     94: #define FREE(p)
                     95: #define INITRC(p)
                     96:
                     97: /* data structures */
                     98:
                     99: #define O_N 1
                    100: #define O_P 2
                    101: #define O_R 3
                    102: #define O_LIST 4
                    103: #define O_VECT 5
                    104: #define O_MAT 6
                    105: #define O_STR 7
                    106: #define O_COMP 8
                    107: #define O_DP 9
                    108: #define O_USINT 10
                    109: #define O_ERR 11
                    110: #define O_GF2MAT 12
                    111: #define O_MATHCAP 13
                    112: #define O_F 14
                    113: #define O_GFMMAT 15
1.6       noro      114: #define O_BYTEARRAY 16
1.13      noro      115: #define O_QUOTE 17
1.1       noro      116: #define O_VOID -1
                    117:
                    118: #define N_Q 0
                    119: #define N_R 1
                    120: #define N_A 2
                    121: #define N_B 3
                    122: #define N_C 4
                    123: #define N_M 5
                    124: #define N_LM 6
                    125: #define N_GF2N 7
                    126: #define N_GFPN 8
1.12      noro      127: #define N_GFS 9
1.21      noro      128: #define N_GFSN 10
1.1       noro      129:
                    130: #define ORD_REVGRADLEX 0
                    131: #define ORD_GRADLEX 1
                    132: #define ORD_LEX 2
                    133:
                    134: #if LONG_IS_32BIT
                    135: #if defined(VISUAL)
                    136: typedef _int64 L;
                    137: typedef unsigned _int64 UL;
                    138: #else
                    139: typedef long long L;
                    140: typedef unsigned long long UL;
                    141: #endif
                    142: #else
                    143: typedef long L;
                    144: typedef unsigned long UL;
                    145: #endif
                    146:
                    147: typedef struct oN {
                    148:        int p;
                    149:        unsigned int b[1];
                    150: } *N;
                    151:
                    152: typedef struct oUP2 {
                    153:        int w;
                    154:        unsigned int b[1];
                    155: } *UP2;
                    156:
                    157: typedef struct _oUP2 {
                    158:        int w;
                    159:        unsigned int *b;
                    160: } *_UP2;
                    161:
                    162: #define UP2_DENSE 0
                    163: #define UP2_SPARSE 1
                    164:
                    165: typedef struct oGEN_UP2 {
                    166:        int id;
                    167:        UP2 dense;
                    168:        UP2 sparse;
                    169: } *GEN_UP2;
                    170:
                    171: typedef struct oV {
                    172:        char *name;
                    173:        pointer attr;
                    174:        pointer priv;
                    175: } *V;
                    176:
                    177: typedef struct oQ {
                    178:        short id;
                    179:        char nid;
                    180:        char sgn;
                    181:        N nm;
                    182:        N dn;
                    183: } *Q;
                    184:
                    185: typedef struct oReal {
                    186:        short id;
                    187:        char nid;
                    188:        char pad;
                    189:        double body;
                    190: } *Real;
                    191:
                    192: typedef struct oAlg {
                    193:        short id;
                    194:        char nid;
                    195:        char pad;
                    196:        struct oObj *body;
                    197: } *Alg;
                    198:
                    199: typedef struct oBF {
                    200:        short id;
                    201:        char nid;
                    202:        char pad;
                    203:        long body[1];
                    204: } *BF;
                    205:
                    206: typedef struct oC {
                    207:        short id;
                    208:        char nid;
                    209:        char pad;
                    210:        struct oNum *r,*i;
                    211: } *C;
                    212:
                    213: typedef struct oLM {
                    214:        short id;
                    215:        char nid;
                    216:        char pad;
                    217:        struct oN *body;
                    218: } *LM;
                    219:
                    220: typedef struct oGF2N {
                    221:        short id;
                    222:        char nid;
                    223:        char pad;
                    224:        struct oUP2 *body;
                    225: } *GF2N;
                    226:
                    227: typedef struct oGFPN {
                    228:        short id;
                    229:        char nid;
                    230:        char pad;
                    231:        struct oUP *body;
                    232: } *GFPN;
                    233:
                    234: typedef struct oNum {
                    235:        short id;
                    236:        char nid;
                    237:        char pad;
                    238: } *Num;
                    239:
                    240: typedef struct oMQ {
                    241:        short id;
                    242:        char nid;
                    243:        char pad;
                    244:        int cont;
                    245: } *MQ;
                    246:
1.12      noro      247: typedef struct oGFS {
                    248:        short id;
                    249:        char nid;
                    250:        char pad;
                    251:        int cont;
                    252: } *GFS;
                    253:
1.21      noro      254: typedef struct oGFSN {
1.20      noro      255:        short id;
                    256:        char nid;
                    257:        char pad;
                    258:        struct oUM *body;
1.21      noro      259: } *GFSN;
1.12      noro      260:
1.1       noro      261: typedef struct oP {
                    262:        short id;
                    263:        short pad;
                    264:        V v;
                    265:        struct oDCP *dc;
                    266: } *P;
                    267:
                    268: typedef struct oR {
                    269:        short id;
                    270:        short reduced;
                    271:        P nm;
                    272:        P dn;
                    273: } *R;
                    274:
                    275: typedef struct oVECT {
                    276:        short id;
                    277:        short pad;
                    278:        int len;
                    279:        pointer *body;
                    280: } *VECT;
                    281:
                    282: typedef struct oMAT {
                    283:        short id;
                    284:        short pad;
                    285:        int row,col;
                    286:        pointer **body;
                    287: } *MAT;
                    288:
                    289: typedef struct oGF2MAT {
                    290:        short id;
                    291:        short pad;
                    292:        int row,col;
                    293:        unsigned int **body;
                    294: } *GF2MAT, *GFMMAT;
                    295:
                    296: typedef struct oLIST {
                    297:        short id;
                    298:        short pad;
                    299:        struct oNODE *body;
                    300: } *LIST;
                    301:
                    302: typedef struct oSTRING {
                    303:        short id;
                    304:        short pad;
                    305:        char *body;
                    306: } *STRING;
                    307:
                    308: typedef struct oCOMP {
                    309:        short id;
                    310:        short type;
                    311:        struct oObj *member[1];
                    312: } *COMP;
                    313:
                    314: typedef struct oDP {
                    315:        short id;
                    316:        short nv;
                    317:        int sugar;
                    318:        struct oMP *body;
                    319: } *DP;
                    320:
                    321: typedef struct oUSINT {
                    322:        short id;
                    323:        short pad;
                    324:        unsigned body;
                    325: } *USINT;
                    326:
                    327: typedef struct oERR {
                    328:        short id;
                    329:        short pad;
                    330:        struct oObj *body;
                    331: } *ERR;
                    332:
                    333: typedef struct oMATHCAP {
                    334:        short id;
                    335:        short pad;
                    336:        struct oLIST *body;
                    337: } *MATHCAP;
                    338:
1.6       noro      339: typedef struct oBYTEARRAY {
                    340:        short id;
                    341:        short pad;
                    342:        int len;
                    343:        unsigned char *body;
                    344: } *BYTEARRAY;
                    345:
1.13      noro      346: typedef struct oQUOTE {
                    347:        short id;
                    348:        short pad;
                    349:        pointer body;
                    350: } *QUOTE;
                    351:
1.1       noro      352: typedef struct oObj {
                    353:        short id;
                    354:        short pad;
                    355: } *Obj;
                    356:
                    357: typedef struct oDCP {
                    358:        Q d;
                    359:        P c;
                    360:        struct oDCP *next;
                    361: } *DCP;
                    362:
                    363: typedef struct oMP {
                    364:        struct oDL *dl;
                    365:        P c;
                    366:        struct oMP *next;
                    367: } *MP;
                    368:
                    369: typedef struct oDL {
                    370:        int td;
                    371:        int d[1];
                    372: } *DL;
1.23      noro      373:
1.29      noro      374: struct dp_pairs {
                    375:        int dp1, dp2;
                    376:        DL lcm;
                    377:        int sugar;
                    378:        struct dp_pairs *next;
                    379: };
                    380:
                    381: typedef struct dp_pairs *DP_pairs;
                    382:
                    383: struct p_pair {
                    384:        struct oUM *p0;
                    385:        struct oUM *p1;
                    386:        struct p_pair *next;
                    387: };
                    388:
                    389: struct oMF {
                    390:        int m;
                    391:        P f;
                    392: };
                    393:
1.23      noro      394: /*
                    395:  * compressed DP
                    396:  */
                    397:
                    398: typedef struct oCDP {
                    399:        int len;
1.26      noro      400:        int psindex;
1.27      noro      401:        unsigned int *body;
1.23      noro      402: } *CDP;
                    403:
1.24      noro      404: typedef struct oCM {
1.23      noro      405:        int index;
                    406:        int c;
1.24      noro      407: } *CM;
1.1       noro      408:
1.25      noro      409: /* bucket list for DL */
                    410:
                    411: typedef struct oDLBUCKET {
                    412:        int td;
                    413:        struct oNODE *body;
                    414:        struct oDLBUCKET *next;
                    415: } *DLBUCKET;
                    416:
1.1       noro      417: typedef struct oVL {
                    418:        V v;
                    419:        struct oVL *next;
                    420: } *VL;
                    421:
                    422: typedef struct oNODE {
                    423:        pointer body;
                    424:        struct oNODE *next;
                    425: } *NODE;
                    426:
1.16      noro      427: /* univariate poly over small finite field; dense */
1.1       noro      428: typedef struct oUM {
                    429:        int d;
                    430:        int c[1];
                    431: } *UM;
                    432:
1.16      noro      433: /* univariate poly with padic coeff */
1.1       noro      434: typedef struct oLUM {
                    435:        int d;
                    436:        int *c[1];
                    437: } *LUM;
                    438:
1.16      noro      439: /* bivariate poly over small finite field; dense */
                    440:
                    441: typedef struct oBM {
                    442:        int d;
                    443:        UM c[1];
                    444: } *BM;
                    445:
1.1       noro      446: typedef struct oML {
                    447:        int n;
                    448:        int mod;
                    449:        int bound;
                    450:        pointer c[1];
                    451: } *ML;
                    452:
                    453: typedef struct oUB {
                    454:        int d;
                    455:        N c[1];
                    456: } *UB;
                    457:
                    458: typedef struct oVN {
                    459:        V v;
                    460:        int n;
                    461: } *VN;
                    462:
                    463: typedef struct oUP {
                    464:        int d;
                    465:        Num c[1];
                    466: } *UP;
                    467:
                    468: typedef struct oDUM {
                    469:        int n;
                    470:        UM f;
                    471: } *DUM;
                    472:
                    473: struct order_pair {
                    474:        int order, length;
                    475: };
                    476:
                    477: struct order_spec {
                    478:        int id;
                    479:        Obj obj;
                    480:        int nv;
                    481:        union {
                    482:                int simple;
                    483:                struct {
                    484:                        int length;
                    485:                        struct order_pair *order_pair;
                    486:                } block;
                    487:                struct {
                    488:                        int row;
                    489:                        int **matrix;
                    490:                } matrix;
                    491:        } ord;
                    492: };
                    493:
                    494: /* structure for cputime */
                    495:
                    496: struct oEGT {
                    497:        double exectime,gctime;
                    498: };
                    499:
                    500: /* constant */
                    501:
                    502: /* ground finite field specification */
                    503: #define FF_NOT_SET 0
                    504: #define FF_GFP 1
                    505: #define FF_GF2N 2
                    506: #define FF_GFPN 3
1.12      noro      507: #define FF_GFS 4
1.21      noro      508: #define FF_GFSN 5
1.11      saito     509:
                    510: /* include interval.h */
                    511: #include "interval.h"
1.1       noro      512:
                    513: #define INDEX 100
                    514:
                    515: #if USE_FLOAT
                    516: typedef float ModNum;
                    517: #define NPrimes 536
                    518: #else
                    519: typedef unsigned int ModNum;
                    520: #define NPrimes 13681
                    521: #endif
                    522:
                    523: /* general macros */
1.28      noro      524: #if defined(MAX)
                    525: #undef MAX
                    526: #endif
                    527: #if defined(MIN)
                    528: #undef MIN
                    529: #endif
1.1       noro      530: #define MAX(a,b) ((a) > (b) ? (a) : (b) )
                    531: #define MIN(a,b) ((a) > (b) ? (b) : (a) )
                    532: #ifdef ABS
                    533: #undef ABS
                    534: #endif
                    535: #define ABS(a) ((a)>0?(a):-(a))
                    536: #define ID(p) ((p)->id)
                    537: #define OID(p) (((Obj)(p))->id)
                    538: #define NID(p) (((Num)(p))->nid)
                    539: #define BDY(p) ((p)->body)
                    540: #define VR(p) ((p)->v)
                    541: #define NAME(p) ((p)->name)
                    542: #define NEXT(p) ((p)->next)
                    543: #define NM(q) ((q)->nm)
                    544: #define DN(q) ((q)->dn)
                    545: #define SGN(q) ((q)->sgn)
                    546: #define DC(p) ((p)->dc)
                    547: #define COEF(p) ((p)->c)
                    548: #define DEG(p) ((p)->d)
                    549: #define PL(n) ((n)->p)
                    550: #define BD(n) ((n)->b)
                    551: #define CONT(a) ((a)->cont)
                    552: #define UDEG(f) BD(NM(DEG(DC(f))))[0]
                    553: #define UCOEF(f) (COEF(DC(f)))
                    554: #define LC(f) (NUM(f)?(f):COEF(DC(f)))
                    555:
                    556: /* memory allocators (W_... : uses alloca) */
                    557:
                    558: #if 0
                    559: #define MALLOC(d) Risa_GC_malloc(d)
                    560: #define MALLOC_ATOMIC(d) Risa_GC_malloc_atomic(d)
                    561: #define REALLOC(p,d) Risa_GC_realloc(p,d)
                    562: #else
                    563: #define MALLOC(d) GC_malloc(d)
                    564: #define MALLOC_ATOMIC(d) GC_malloc_atomic(d)
                    565: #define REALLOC(p,d) GC_realloc(p,d)
                    566: #endif
                    567: #define CALLOC(d,e) MALLOC((d)*(e))
                    568:
                    569: #if (defined(__GNUC__) || defined(vax) || defined(apollo) || defined(alloca) || defined(VISUAL))
                    570: #define ALLOCA(d) alloca(d)
                    571: #else
                    572: #define ALLOCA(d) MALLOC(d)
                    573: #endif
                    574:
                    575: #define TRUESIZE(type,n,atype) (sizeof(struct type)+MAX((n),0)*sizeof(atype))
                    576: #define NALLOC(d) ((N)MALLOC_ATOMIC(TRUESIZE(oN,(d)-1,int)))
                    577: #define UMALLOC(d) ((UM)MALLOC(TRUESIZE(oUM,d,int)))
                    578: #define UPALLOC(d) ((UP)MALLOC(TRUESIZE(oUP,(d),Num)))
                    579: #define C_UMALLOC(d) ((UM)MALLOC(TRUESIZE(oUM,d,int)))
                    580: #define MLALLOC(d) ((ML)MALLOC(TRUESIZE(oML,d,pointer)))
                    581:
                    582: #define W_ALLOC(d) ((int *)ALLOCA(((d)+1)*sizeof(int)))
                    583: #define W_CALLOC(n,type,p) \
                    584: ((p)=(type *)ALLOCA(((n)+1)*sizeof(type)),\
                    585: bzero((char *)(p),(int)(((n)+1)*sizeof(type))))
                    586: #define W_UMALLOC(d) ((UM)ALLOCA(TRUESIZE(oUM,d,int)))
                    587: #define W_UPALLOC(d) ((UP)ALLOCA(TRUESIZE(oUP,(d),Num)))
                    588: #define W_MLALLOC(d) ((ML)ALLOCA(TRUESIZE(oML,d,pointer)))
                    589: #define W_LUMALLOC(n,bound,p)\
                    590: {\
                    591:        LUM ___q___;\
                    592:        int ___i___,**___c___;\
                    593:        (___q___) = (LUM)ALLOCA(TRUESIZE(oLUM,(n),int *));\
                    594:        DEG(___q___) = n;\
                    595:        for ( ___i___ = 0, ___c___ = (int **)COEF(___q___); ___i___ <= n; ___i___++ ) {\
                    596:                ___c___[___i___] = (int *)ALLOCA(((bound)+1)*sizeof(int));\
                    597:                bzero((char *)___c___[___i___],((bound)+1)*sizeof(int));\
                    598:        }\
                    599:        (p) = ___q___;\
                    600: }
                    601:
1.18      noro      602: #define W_BMALLOC(dx,dy,p)\
1.16      noro      603: {\
                    604:        BM ___q___;\
                    605:        int ___i___;\
                    606:        UM *___c___;\
1.18      noro      607:        (___q___) = (BM)ALLOCA(TRUESIZE(oBM,(dy),UM));\
                    608:        DEG(___q___) = dy;\
1.16      noro      609:        ___c___ = (UM *)COEF(___q___);\
1.18      noro      610:        for ( ___i___ = 0; ___i___ <= dy; ___i___++ ) {\
                    611:                ___c___[___i___] = W_UMALLOC(dx);\
                    612:                clearum(___c___[___i___],dx);\
1.16      noro      613:        }\
                    614:        (p) = ___q___;\
                    615: }
                    616:
1.1       noro      617: #define NEWUP2(q,w)\
                    618: ((q)=(UP2)MALLOC_ATOMIC(TRUESIZE(oUP2,(w)-1,unsigned int)),\
                    619: bzero((char *)(q)->b,(w)*sizeof(unsigned int)))
                    620: #define W_NEWUP2(q,w)\
                    621: ((q)=(UP2)ALLOCA(TRUESIZE(oUP2,(w)-1,unsigned int)),\
                    622: bzero((char *)(q)->b,(w)*sizeof(unsigned int)))
                    623: #define W_NEW_UP2(q,w)\
                    624: ((q).b=(unsigned int *)ALLOCA((w)*sizeof(unsigned int)))
                    625:
                    626: /* cell allocators */
                    627: #define NEWQ(q) ((q)=(Q)MALLOC(sizeof(struct oQ)),OID(q)=O_N,NID(q)=N_Q)
                    628: #define NEWMQ(q) ((q)=(MQ)MALLOC_ATOMIC(sizeof(struct oMQ)),OID(q)=O_N,NID(q)=N_M)
1.12      noro      629: #define NEWGFS(q) ((q)=(GFS)MALLOC_ATOMIC(sizeof(struct oGFS)),OID(q)=O_N,NID(q)=N_GFS)
1.21      noro      630: #define NEWGFSN(q) ((q)=(GFSN)MALLOC(sizeof(struct oGFSN)),OID(q)=O_N,NID(q)=N_GFSN)
1.1       noro      631: #define NEWP(p) ((p)=(P)MALLOC(sizeof(struct oP)),OID(p)=O_P)
                    632: #define NEWR(r) ((r)=(R)MALLOC(sizeof(struct oR)),OID(r)=O_R,(r)->reduced=0)
                    633: #define NEWLIST(l) ((l)=(LIST)MALLOC(sizeof(struct oLIST)),OID(l)=O_LIST)
                    634: #define NEWVECT(l) ((l)=(VECT)MALLOC(sizeof(struct oVECT)),OID(l)=O_VECT)
                    635: #define NEWSTR(l) ((l)=(STRING)MALLOC(sizeof(struct oSTRING)),OID(l)=O_STR)
                    636: #define NEWCOMP(c,n) ((c)=(COMP)MALLOC(sizeof(struct oCOMP)+((n)-1)*sizeof(Obj)),OID(c)=O_COMP)
                    637: #define NEWDP(d) ((d)=(DP)MALLOC(sizeof(struct oDP)),OID(d)=O_DP)
                    638: #define NEWUSINT(u) ((u)=(USINT)MALLOC_ATOMIC(sizeof(struct oUSINT)),OID(u)=O_USINT)
                    639: #define NEWERR(e) ((e)=(ERR)MALLOC(sizeof(struct oERR)),OID(e)=O_ERR)
                    640: #define NEWMATHCAP(e) ((e)=(MATHCAP)MALLOC(sizeof(struct oMATHCAP)),OID(e)=O_MATHCAP)
1.6       noro      641: #define NEWBYTEARRAY(e) ((e)=(BYTEARRAY)MALLOC(sizeof(struct oBYTEARRAY)),OID(e)=O_BYTEARRAY)
1.13      noro      642: #define NEWQUOTE(e) ((e)=(QUOTE)MALLOC(sizeof(struct oQUOTE)),OID(e)=O_QUOTE)
1.1       noro      643:
                    644: #define NEWNODE(a) ((a)=(NODE)MALLOC(sizeof(struct oNODE)))
                    645: #define NEWDC(dc) ((dc)=(DCP)MALLOC(sizeof(struct oDCP)))
                    646: #define NEWV(v) ((v)=(V)MALLOC(sizeof(struct oV)))
                    647: #define NEWVL(vl) ((vl)=(VL)MALLOC(sizeof(struct oVL)))
                    648: #define NEWMP(m) ((m)=(MP)MALLOC(sizeof(struct oMP)))
1.25      noro      649: #define NEWDLBUCKET(a) ((a)=(DLBUCKET)MALLOC(sizeof(struct oDLBUCKET)))
1.29      noro      650: #define NEWDPP(a) ((a)=(DP_pairs)MALLOC(sizeof(struct dp_pairs)))
1.1       noro      651:
                    652: #define NEWMAT(l) ((l)=(MAT)MALLOC(sizeof(struct oMAT)),OID(l)=O_MAT)
                    653: #define NEWGF2MAT(l) ((l)=(GF2MAT)MALLOC(sizeof(struct oGF2MAT)),OID(l)=O_GF2MAT)
                    654: #define NEWGFMMAT(l) ((l)=(GFMMAT)MALLOC(sizeof(struct oGF2MAT)),OID(l)=O_GFMMAT)
                    655: #define NEWReal(q) ((q)=(Real)MALLOC_ATOMIC(sizeof(struct oReal)),OID(q)=O_N,NID(q)=N_R)
                    656: #define NEWAlg(r) ((r)=(Alg)MALLOC(sizeof(struct oAlg)),OID(r)=O_N,NID(r)=N_A)
                    657: #define NEWBF(q,l) ((q)=(BF)MALLOC_ATOMIC(TRUESIZE(oBF,(l)-1,long)),OID(q)=O_N,NID(q)=N_B)
                    658: #define NEWC(r) ((r)=(C)MALLOC(sizeof(struct oC)),OID(r)=O_N,NID(r)=N_C)
                    659: #define NEWLM(r) ((r)=(LM)MALLOC(sizeof(struct oLM)),OID(r)=O_N,NID(r)=N_LM)
                    660: #define NEWGF2N(r) ((r)=(GF2N)MALLOC(sizeof(struct oGF2N)),OID(r)=O_N,NID(r)=N_GF2N)
                    661: #define NEWGFPN(r) ((r)=(GFPN)MALLOC(sizeof(struct oGFPN)),OID(r)=O_N,NID(r)=N_GFPN)
                    662: #define NEWDL(d,n) \
                    663: ((d)=(DL)MALLOC_ATOMIC(TRUESIZE(oDL,(n)-1,int)),bzero((char *)(d),TRUESIZE(oDL,(n)-1,int)))
1.9       noro      664: #define NEWDL_NOINIT(d,n) \
                    665: ((d)=(DL)MALLOC_ATOMIC(TRUESIZE(oDL,(n)-1,int)))
1.1       noro      666:
                    667: #define MKP(v,dc,p) \
                    668: (!DEG(dc)?((p)=COEF(dc)):(NEWP(p),VR(p)=(v),DC(p)=(dc),(p)))
                    669: #define MKV(v,p) \
                    670: (NEWP(p),VR(p)=(v),NEWDC(DC(p)),\
                    671: DEG(DC(p))=ONE,COEF(DC(p))=(P)ONE,NEXT(DC(p))=0)
                    672: #define MKRAT(n,d,r,p) \
                    673: (NEWR(p),NM(p)=(n),DN(p)=(d),(p)->reduced=(r))
                    674: #define MKMV(v,p) \
                    675: (NEWP(p),VR(p)=(v),NEWDC(DC(p)),\
                    676: DEG(DC(p))=ONE,COEF(DC(p))=(P)ONEM,NEXT(DC(p))=0)
                    677: #define MKNODE(a,b,c) \
                    678: (NEWNODE(a),(a)->body=(pointer)b,NEXT(a)=(NODE)(c))
                    679: #define MKLIST(a,b) (NEWLIST(a),(a)->body=(NODE)(b))
                    680: #define MKVECT(m,l) \
                    681: (NEWVECT(m),(m)->len=(l),(m)->body=(pointer *)CALLOC((l),sizeof(pointer)))
                    682: #define MKMAT(m,r,c) \
                    683: (NEWMAT(m),(m)->row=(r),(m)->col=(c),(m)->body=(pointer **)almat_pointer((r),(c)))
                    684: #define TOGF2MAT(r,c,b,m) (NEWGF2MAT(m),(m)->row=(r),(m)->col=(c),(m)->body=(b))
                    685: #define TOGFMMAT(r,c,b,m) (NEWGFMMAT(m),(m)->row=(r),(m)->col=(c),(m)->body=(b))
                    686: #define MKSTR(a,b) (NEWSTR(a),(a)->body=(char *)(b))
                    687: #define MKDP(n,m,d) (NEWDP(d),(d)->nv=(n),BDY(d)=(m))
                    688: #define MKLM(b,l) (!(b)?(l)=0:(NEWLM(l),(l)->body=(b),(l)))
                    689: #define MKGF2N(b,l) (!(b)?(l)=0:(NEWGF2N(l),(l)->body=(b),(l)))
                    690: #define MKGFPN(b,l) (!(b)?(l)=0:(NEWGFPN(l),(l)->body=(b),(l)))
                    691: #define MKUSINT(u,b) (NEWUSINT(u),(u)->body=(unsigned)(b))
                    692: #define MKERR(e,b) (NEWERR(e),(e)->body=(Obj)(b))
                    693: #define MKMATHCAP(e,b) (NEWMATHCAP(e),(e)->body=(LIST)(b))
1.6       noro      694: #define MKBYTEARRAY(m,l) \
                    695: (NEWBYTEARRAY(m),(m)->len=(l),(m)->body=(char *)MALLOC_ATOMIC((l)),bzero((m)->body,(l)))
1.13      noro      696: #define MKQUOTE(q,b) (NEWQUOTE(q),(q)->body=(pointer)(b))
1.1       noro      697:
                    698: #define NEXTDC(r,c) \
                    699: if(!(r)){NEWDC(r);(c)=(r);}else{NEWDC(NEXT(c));(c)=NEXT(c);}
                    700: #define NEXTNODE(r,c) \
                    701: if(!(r)){NEWNODE(r);(c)=(r);}else{NEWNODE(NEXT(c));(c)=NEXT(c);}
                    702: #define NEXTMP(r,c) \
                    703: if(!(r)){NEWMP(r);(c)=(r);}else{NEWMP(NEXT(c));(c)=NEXT(c);}
1.9       noro      704: #define NEXTMP2(r,c,s) \
                    705: if(!(r)){(c)=(r)=(s);}else{NEXT(c)=(s);(c)=(s);}
1.25      noro      706: #define NEXTDLBUCKET(r,c) \
                    707: if(!(r)){NEWDLBUCKET(r);(c)=(r);}else{NEWDLBUCKET(NEXT(c));(c)=NEXT(c);}
1.29      noro      708: #define NEXTVL(r,c) \
                    709: if(!(r)){NEWVL(r);(c)=(r);}else{NEWVL(NEXT(c));(c)=NEXT(c);}
                    710: #define NEXTDPP(r,c) \
                    711: if(!(r)){NEWDPP(r);(c)=(r);}else{NEWDPP(NEXT(c));(c)=NEXT(c);}
1.1       noro      712:
                    713: /* convertors */
                    714: #define NTOQ(n,s,q) \
                    715: (!(n)?((q)=0):(NEWQ(q),SGN(q)=(s),NM(q)=(n),DN(q)=0,(q)))
                    716: #define NDTOQ(n,d,s,q) \
                    717: ((!(d)||UNIN(d))?NTOQ(n,s,q):(NEWQ(q),SGN(q)=(s),NM(q)=(n),DN(q)=(d),(q)))
                    718: #define DUPQ(p,q) \
                    719: (NEWQ(q),SGN(q)=SGN(p),NM(q)=NM(p),DN(q)=DN(p))
                    720: #define STOQ(n,q) \
                    721: ((!(n))?((q)=(Q)NULL):(NEWQ(q),\
                    722: SGN(q)=((n)>0?1:-1),NM(q)=NALLOC(1),\
                    723: PL(NM(q))=1,BD(NM(q))[0]=ABS(n),DN(q)=0,(q)))
                    724: #define UTOMQ(a,b) \
                    725: ((a)?(NEWMQ(b),CONT(b)=(unsigned int)(a),(b)):((b)=0))
1.12      noro      726: #define MKGFS(a,b) \
                    727: ((NEWGFS(b),CONT(b)=(a),(b)))
1.21      noro      728: #define MKGFSN(a,b) \
                    729: ((DEG(a)>=0)?(NEWGFSN(b),BDY(b)=(a),(b)):((b)=0))
1.1       noro      730: #define STOMQ(a,b) \
                    731: ((a)?(NEWMQ(b),CONT(b)=(a),(b)):((b)=0))
                    732: #define UTON(u,n) \
                    733: ((!(u))?((n)=(N)NULL):((n)=NALLOC(1),PL(n)=1,BD(n)[0]=(unsigned int)(u),(n)))
                    734: #define UTOQ(n,q) \
                    735: ((!(n))?((q)=(Q)NULL):(NEWQ(q),\
                    736: SGN(q)=1,NM(q)=NALLOC(1),\
                    737: PL(NM(q))=1,BD(NM(q))[0]=(unsigned int)(n),DN(q)=0,(q)))
                    738: #define QTOS(q) (!(q)?0:SGN(q)*((int)BD(NM(q))[0]))
                    739: #define STON(i,n)\
                    740: (i?((n)=NALLOC(1),PL(n)=1,BD(n)[0]=(i),(n)):((n)=(N)0))
                    741: #define PTOR(a,b) \
                    742: (!(a)?((b)=0):(NEWR(b),NM(b)=(a),DN(b)=(P)ONE,(b)->reduced=1,(b)))
                    743: #define RTOS(a) (!(a)?0:QTOS((Q)NM((R)a)))
                    744: #define MKReal(a,b) (!(a)?((b)=0):(NEWReal(b),BDY(b)=(a),(b)))
                    745: #define MKAlg(b,r) \
                    746: (!(b)?((r)=0):NUM(b)?((r)=(Alg)(b)):(NEWAlg(r),BDY(r)=(Obj)(b),(r)))
                    747:
1.3       noro      748: #if PARI
                    749: #define ToReal(a) (!(a)?(double)0.0:REAL(a)?BDY((Real)a):RATN(a)?RatnToReal((Q)a):BIGFLOAT(a)?rtodbl(BDY((BF)a)):0)
                    750: #else
                    751: #define ToReal(a) (!(a)?(double)0.0:REAL(a)?BDY((Real)a):RATN(a)?RatnToReal((Q)a):0.0)
                    752: #endif
1.1       noro      753:
                    754: /* predicates */
                    755: #define NUM(p) (OID(p)==O_N)
                    756: #define RAT(p) (OID(p)==O_R)
                    757: #define RATN(a) (NID(a)==N_Q)
1.22      noro      758: #define INT(q) (!(q)||(NUM(q)&&RATN((Num)q)&&!DN((Q)q)))
1.1       noro      759: #define REAL(a) (NID(a)==N_R)
1.3       noro      760: #define BIGFLOAT(a) (NID(a)==N_B)
1.1       noro      761: #define SFF(a) (NID(a)==N_M)
                    762: #define UNIQ(q) ((q)&&NUM(q)&&RATN(q)&&(SGN((Q)q)==1)&&UNIN(NM((Q)q))&&(!DN((Q)q)))
                    763: #define UNIMQ(q) ((q)&&NUM(q)&&SFF(q)&&(CONT((MQ)q)==1))
                    764: #define MUNIQ(q) ((q)&&NUM(q)&&RATN(q)&&(SGN((Q)q)==-1)&&UNIN(NM((Q)q))&&(!DN((Q)q)))
                    765: #define MUNIMQ(q) ((q)&&NUM(q)&&SFF(q)&&(CONT((MQ)q)==-1))
                    766: #define UNIN(n) ((n)&&(PL(n)==1)&&(BD(n)[0]==1))
                    767: #define EVENN(n) ((!(n))||(!(BD(n)[0]%2)))
                    768:
1.8       noro      769: /* special macros for private memory management */
                    770:
                    771: #define NV(p) ((p)->nv)
                    772: #define C(p) ((p)->c)
1.28      noro      773: #if 0
1.8       noro      774: #define ITOS(p) (((unsigned int)(p))&0x7fffffff)
                    775: #define STOI(i) ((P)((unsigned int)(i)|0x80000000))
1.28      noro      776: #else
                    777: #define ITOS(p) (((unsigned int)(p)))
                    778: #define STOI(i) ((P)((unsigned int)(i)))
                    779: #endif
1.15      noro      780:
                    781: /* immediate GFS representation */
                    782:
                    783: #define IFTOF(p) ((int)(((unsigned int)(p))&0x7fffffff))
                    784: #define FTOIF(i) ((int)(((unsigned int)(i)|0x80000000)))
1.8       noro      785:
                    786: struct cdl {
                    787:        P c;
                    788:        DL d;
                    789: };
                    790:
                    791: struct cdlm {
                    792:        int c;
                    793:        DL d;
                    794: };
                    795:
                    796: extern MP _mp_free_list;
                    797: extern DP _dp_free_list;
                    798: extern DL _dl_free_list;
                    799: extern int current_dl_length;
                    800:
                    801: #define _NEWDL_NOINIT(d,n) if ((n)!= current_dl_length){_dl_free_list=0; current_dl_length=(n);} if(!_dl_free_list)_DL_alloc(); (d)=_dl_free_list; _dl_free_list = *((DL *)_dl_free_list)
                    802: #define _NEWDL(d,n) if ((n)!= current_dl_length){_dl_free_list=0; current_dl_length=(n);} if(!_dl_free_list)_DL_alloc(); (d)=_dl_free_list; _dl_free_list = *((DL *)_dl_free_list); bzero((d),(((n)+1)*sizeof(int)))
                    803: #define _NEWMP(m) if(!_mp_free_list)_MP_alloc(); (m)=_mp_free_list; _mp_free_list = NEXT(_mp_free_list)
1.10      noro      804: #define _MKDP(n,m,d) if(!_dp_free_list)_DP_alloc(); (d)=_dp_free_list; _dp_free_list = (DP)BDY(_dp_free_list); (d)->id = O_DP; (d)->nv=(n); BDY(d)=(m)
1.8       noro      805:
                    806: #define _NEXTMP(r,c) \
                    807: if(!(r)){_NEWMP(r);(c)=(r);}else{_NEWMP(NEXT(c));(c)=NEXT(c);}
                    808:
                    809: #define _NEXTMP2(r,c,s) \
                    810: if(!(r)){(c)=(r)=(s);}else{NEXT(c)=(s);(c)=(s);}
                    811:
                    812: #define _FREEDL(m) *((DL *)m)=_dl_free_list; _dl_free_list=(m)
                    813: #define _FREEMP(m) NEXT(m)=_mp_free_list; _mp_free_list=(m)
                    814: #define _FREEDP(m) BDY(m)=(MP)_dp_free_list; _dp_free_list=(m)
1.1       noro      815:
                    816: /* externals */
                    817: #if 0
                    818: double NatToReal();
                    819: double RatnToReal();
                    820: #endif
                    821:
                    822: extern struct oR oUNIR;
                    823: extern struct oQ oUNIQ;
                    824: extern struct oMQ oUNIMQ;
                    825: extern struct oN oUNIN;
                    826: extern struct oUP2 oONEUP2;
                    827: extern struct oV oVAR[];
                    828: extern struct oV oPVAR[];
                    829: extern struct oVL oVLIST[];
                    830: extern struct oVL oPVLIST[];
                    831: extern VL CO,ALG;
                    832: extern VL PVL;
                    833: extern R ONER;
                    834: extern Q ONE;
                    835: extern MQ ONEM;
                    836: extern LM ONELM;
                    837: extern N ONEN;
                    838: extern UP2 ONEUP2;
                    839:
                    840: extern FILE *asir_out;
1.7       noro      841: #if defined(__GNUC__)
1.1       noro      842: extern const int sprime[];
                    843: #else
                    844: extern int sprime[];
                    845: #endif
1.14      noro      846:
                    847: extern int lprime_size;
                    848: extern int *lprime;
1.1       noro      849:
                    850: extern void (*addnumt[])();
                    851: extern void (*subnumt[])();
                    852: extern void (*mulnumt[])();
                    853: extern void (*divnumt[])();
                    854: extern void (*pwrnumt[])();
                    855: extern int (*cmpnumt[])();
                    856: extern void (*chsgnnumt[])();
                    857:
1.29      noro      858: extern int current_mod;
                    859: extern GEN_UP2 current_mod_gf2n;
                    860: extern int lm_lazy;
                    861: extern int current_ff;
                    862: extern V up_var;
                    863: extern V up2_var;
                    864: extern P current_gfs_ext;
                    865: extern int current_gfs_p;
                    866: extern int current_gfs_q;
                    867: extern int current_gfs_q1;
                    868: extern int *current_gfs_plus1;
                    869: extern int *current_gfs_ntoi;
                    870: extern int *current_gfs_iton;
                    871:
1.1       noro      872: /* prototypes */
                    873: int compui(VL,USINT,USINT);
1.6       noro      874: int compbytearray(VL,BYTEARRAY,BYTEARRAY);
1.1       noro      875:
                    876: void powermodup(UP,UP *);
                    877: void hybrid_powermodup(UP,UP *);
                    878:
                    879: void powertabup(UP,UP,UP *);
                    880: void hybrid_powertabup(UP,UP,UP *);
                    881:
                    882: void generic_powermodup(UP,UP,Q,UP *);
                    883: void hybrid_generic_powermodup(UP,UP,Q,UP *);
                    884:
                    885: void powermod1up(UP,UP *);
                    886: void hybrid_rembymulup_special(int,UP,UP,UP,UP *);
                    887: void hybrid_tmulup(int,UP,UP,int,UP *);
                    888: void hybrid_squareup(int,UP,UP *);
                    889: void hybrid_mulup(int,UP,UP,UP *);
                    890:
                    891: void getmod_lm(N *);
                    892:
                    893: int maxblenup(UP);
                    894: void monicup(UP,UP *);
                    895: void simpup(UP,UP *);
                    896: void simpnum(Num,Num *);
                    897: void decompp(P,Q,P *,P *);
                    898: void truncp(P,Q,P *);
                    899: void uremp(P,P,P *);
                    900: void ugcdp(P,P,P *);
                    901: void reversep(P,Q,P *);
                    902: void invmodp(P,Q,P *);
                    903: void addup(UP,UP,UP *);
                    904: void subup(UP,UP,UP *);
                    905: void chsgnup(UP,UP *);
                    906: void mulup(UP,UP,UP *);
                    907: void tmulup(UP,UP,int,UP *);
                    908: void squareup(UP,UP *);
                    909: void remup(UP,UP,UP *);
                    910: void remup_destructive(UP,UP);
                    911: void qrup(UP,UP,UP *,UP *);
                    912: void qrup_destructive(UP,UP);
                    913: void gcdup(UP,UP,UP *);
                    914: void reverseup(UP,int,UP *);
                    915: void invmodup(UP,int,UP *);
                    916: void pwrup(UP,Q,UP *);
                    917: void squarep_gf2n(VL,P,P *);
                    918: void kmulp(VL,P,P,P *);
                    919: void ksquarep(VL,P,P *);
                    920: void kmulup(UP,UP,UP *);
                    921: void ksquareup(UP,UP *);
                    922: void extractup(UP,int,int,UP *);
                    923: void copyup(UP,UP);
                    924: void c_copyup(UP,int,pointer *);
                    925: void kmulupmain(UP,UP,UP *);
                    926: void ksquareupmain(UP,UP *);
                    927: void rembymulup(UP,UP,UP *);
                    928: void rembymulup_special(UP,UP,UP,UP *);
                    929: void tkmulup(UP,UP,int,UP *);
                    930: void shiftup(UP,int,UP *);
                    931: void set_degreeup(UP,int);
                    932: void decompup(UP,int,UP *,UP *);
                    933: void truncup(UP,int,UP *);
                    934: void uptofmarray(int,UP,ModNum *);
                    935: void fmarraytoup(ModNum *,int,UP *);
                    936: void uiarraytoup(unsigned int **,int,int,UP *);
                    937: void adj_coefup(UP,N,N,UP *);
                    938: void uptolmup(UP,UP *);
                    939: void remcup(UP,N,UP *);
                    940: void fft_mulup(UP,UP,UP *);
                    941: void fft_squareup(UP,UP *);
                    942: void trunc_fft_mulup(UP,UP,int,UP *);
                    943: void shoup_fft_mulup(UP,UP,UP *);
                    944: void shoup_fft_squareup(UP,UP *);
                    945: void shoup_trunc_fft_mulup(UP,UP,int,UP *);
                    946: void crup(ModNum **,int,int *,int,N,UP *);
                    947: void shoup_crup(ModNum **,int,int *,int,N,N,UP *);
                    948: void squareup_gf2n(UP,UP *);
                    949: void powermodup_gf2n(UP,UP *);
                    950: void generic_powermodup_gf2n(UP,UP,Q,UP *);
                    951: void tracemodup_gf2n(UP,UP,Q,UP *);
                    952: void tracemodup_gf2n_slow(UP,UP,Q,UP *);
                    953: void tracemodup_gf2n_tab(UP,UP,Q,UP *);
                    954: void square_rem_tab_up_gf2n(UP,UP *,UP *);
                    955: void powertabup_gf2n(UP,UP,UP *);
                    956: void find_root_gf2n(UP,GF2N *);
                    957:
                    958: int cmpdl_matrix(int,DL,DL);
                    959: int cmpdl_order_pair(int,DL,DL);
                    960: int cmpdl_elim(int,DL,DL);
                    961: int cmpdl_blexrev(int,DL,DL);
                    962: int cmpdl_bgradrev(int,DL,DL);
                    963: int cmpdl_brevrev(int,DL,DL);
                    964: int cmpdl_brevgradlex(int,DL,DL);
                    965: int cmpdl_bgradlex(int,DL,DL);
                    966: int cmpdl_blex(int,DL,DL);
                    967: int cmpdl_revgradlex(int,DL,DL);
                    968: int cmpdl_gradlex(int,DL,DL);
                    969: int cmpdl_revlex(int,DL,DL);
                    970: int cmpdl_lex(int,DL,DL);
                    971: int compd(VL,DP,DP);
                    972: void adddl(int,DL,DL,DL *);
                    973: void divsdc(VL,DP,P,DP *);
                    974: void muldc(VL,DP,P,DP *);
                    975: void muldm(VL,DP,MP,DP *);
                    976: void muld(VL,DP,DP,DP *);
                    977: void chsgnd(DP,DP *);
                    978: void subd(VL,DP,DP,DP *);
                    979: void addd(VL,DP,DP,DP *);
                    980: int sugard(MP);
                    981: void nodetod(NODE,DP *);
                    982: void dtop(VL,VL,DP,P *);
                    983: void ptod(VL,VL,P,DP *);
                    984: void initd(struct order_spec *);
                    985:
                    986: void _printdp(DP);
                    987: void _dp_sp_mod(DP,DP,int,DP *);
                    988: void _dp_mod(DP,int,NODE,DP *);
                    989: void _dp_red_mod(DP,DP,int,DP *);
                    990: void _dtop_mod(VL,VL,DP,P *);
                    991: void _mulmdm(VL,int,DP,MP,DP *);
                    992: void _mulmd(VL,int,DP,DP,DP *);
                    993: void _chsgnmd(int,DP,DP *);
                    994: void _submd(VL,int,DP,DP,DP *);
                    995: void _addmd(VL,int,DP,DP,DP *);
                    996: void _mdtop(VL,int,VL,DP,P *);
                    997: void divsmdc(VL,int,DP,P,DP *);
                    998: void mulmdc(VL,int,DP,P,DP *);
                    999: void mulmdm(VL,int,DP,MP,DP *);
                   1000: void mulmd(VL,int,DP,DP,DP *);
                   1001: void chsgnmd(int,DP,DP *);
                   1002: void submd(VL,int,DP,DP,DP *);
                   1003: void addmd(VL,int,DP,DP,DP *);
                   1004: void mdtop(VL,int,VL,DP,P *);
                   1005: void mptomd(VL,int,VL,P,DP *);
                   1006: void ptomd(VL,int,VL,P,DP *);
                   1007: int p_mag(P);
                   1008: int n_bits(N);
                   1009: void gcdBinary_27n(N,N,N *);
                   1010: void rtime_init(void);
                   1011: void setmod_gf2n(P);
                   1012: void mt_sgenrand(unsigned long);
                   1013: unsigned long mt_genrand(void);
                   1014: #if defined(VISUAL)
                   1015: void srandom(unsigned int);
                   1016: unsigned int random(void);
                   1017: #endif
                   1018: void gcdbmodn(N,N,N *);
                   1019: void gcdbinn(N,N,N *);
                   1020: void gcdmodn(N,N,N *);
                   1021: void gcdaccn(N,N,N *);
                   1022: void gcdEuclidn(N,N,N *);
                   1023: void GC_free(void *);
                   1024: void FFT_primes(int,int *,int *,int *);
                   1025: int FFT_pol_product(unsigned int,unsigned int *, unsigned int,unsigned int *,
                   1026:        unsigned int *,int,unsigned int *);
                   1027: int FFT_pol_square(unsigned int,unsigned int *,
                   1028:        unsigned int *,int,unsigned int *);
                   1029: void dcptolist(DCP,LIST *);
                   1030: void gcdprsmp(VL,int,P,P,P *);
                   1031: void mult_mod_tab(UM,int,UM *,UM,int);
                   1032: int nfctr_mod(UM,int);
                   1033: int irred_check(UM,int);
                   1034: void modfctrp(P,int,int,DCP *);
                   1035: void pf_init(void);
                   1036: void binaryton(char *,N *);
                   1037: void hexton(char *,N *);
                   1038: void ptolmp(P,P *);
                   1039: void lmptop(P,P *);
                   1040: void ulmptoum(int,UP,UM);
                   1041: void objtobobj(int,Obj,Obj *);
                   1042: void bobjtoobj(int,Obj,Obj *);
                   1043: void numtobnum(int,Num,Num *);
                   1044: void bnumtonum(int,Num,Num *);
                   1045: void ptobp(int,P,P *);
                   1046: void bptop(int,P,P *);
                   1047: void listtoblist(int,LIST,LIST *);
                   1048: void blisttolist(int,LIST,LIST *);
                   1049: void vecttobvect(int,VECT,VECT *);
                   1050: void bvecttovect(int,VECT,VECT *);
                   1051: void mattobmat(int,MAT,MAT *);
                   1052: void bmattomat(int,MAT,MAT *);
                   1053: void n32ton27(N,N *);
                   1054: void n27ton32(N,N *);
                   1055: void kmulum(int,UM,UM,UM);
                   1056: void saveobj(FILE *,Obj);
                   1057: void endian_init(void);
                   1058: void write_char(FILE *,unsigned char *);
                   1059: void write_short(FILE *,unsigned short *);
                   1060: void write_int(FILE *,unsigned int *);
                   1061: void write_double(FILE *,double *);
                   1062: void write_intarray(FILE *,unsigned int *,int);
                   1063: void write_string(FILE *,unsigned char *,int);
                   1064: void savestr(FILE *,char *);
                   1065: void loadstr(FILE *,char **);
                   1066: void savevl(FILE *,VL);
                   1067: void loadvl(FILE *);
                   1068: void skipvl(FILE *);
                   1069: void savev(FILE *,V);
                   1070: void loadv(FILE *,V *);
                   1071: int save_convv(V);
                   1072: V load_convv(int);
                   1073: void swap_bytes(char *,int,int);
                   1074: void read_char(FILE *,unsigned char *);
                   1075: void read_short(FILE *,unsigned short *);
                   1076: void read_int(FILE *,unsigned int *);
                   1077: void read_double(FILE *,double *);
                   1078: void read_intarray(FILE *,unsigned int *,int);
                   1079: void read_string(FILE *,unsigned char *,int);
                   1080: void loadobj(FILE *,Obj *);
                   1081: void invum(int,UM,UM,UM);
                   1082: void addarray_to(unsigned int *,int,unsigned int *,int);
                   1083: void muln_1(unsigned int *,int,unsigned int,unsigned int *);
                   1084: unsigned int divn_1(unsigned int *,int,unsigned int,unsigned int *);
                   1085: void ptoup(P,UP *);
                   1086: void uptop(UP,P *);
                   1087: void printnum(Num);
                   1088: void printv(VL,V);
                   1089: void kmulq(Q,Q,Q *);
                   1090: void bshiftn(N,int,N *);
                   1091: void remn(N,N,N*);
                   1092: void simplm(LM,LM *);
                   1093: void qtolm(Q,LM *);
                   1094: int qpcheck(Obj);
                   1095: int headsgn(P);
                   1096: void adjsgn(P,DCP);
                   1097: void setmod_g2n(P);
                   1098: void simpgf2n(GF2N,GF2N *);
                   1099: void ptogf2n(Obj,GF2N *);
                   1100: void gf2ntop(GF2N,P *);
                   1101: void gf2ntovect(GF2N,VECT *);
                   1102: void squaregf2n(GF2N,GF2N *);
                   1103: void randomgf2n(GF2N *);
                   1104: void invgf2n(GF2N,GF2N *);
                   1105: void kmuln(N,N,N *);
                   1106: void extractn(N,int,int,N *);
                   1107: void copyn(N,int,int *);
                   1108: void kmulnmain(N,N,N *);
                   1109: int qcoefp(Obj);
                   1110: int qcoefr(Obj);
                   1111: int get_allocwords(void);
                   1112: double get_clock(void);
                   1113: void get_eg(struct oEGT *);
                   1114: void printtime(struct oEGT *,struct oEGT *,double);
                   1115: void init_eg(struct oEGT *);
                   1116: void add_eg(struct oEGT *,struct oEGT *,struct oEGT *);
                   1117: void print_eg(char *,struct oEGT *);
                   1118: void print_split_eg(struct oEGT *,struct oEGT *);
                   1119: void print_split_e(struct oEGT *,struct oEGT *);
                   1120: void suspend_timer(void);
                   1121: void resume_timer(void);
                   1122: void reset_engine(void);
                   1123: void notdef(VL,Obj,Obj,Obj *);
                   1124: void error(char *);
                   1125: void ptoup2(P,UP2 *);
                   1126: void ptoup2_sparse(P,UP2 *);
                   1127: void up2top(UP2,P *);
                   1128: void up2tovect(UP2,VECT *);
                   1129: void up2ton(UP2,Q *);
                   1130: void ntoup2(Q,UP2 *);
                   1131: void gen_simpup2(UP2,GEN_UP2,UP2 *);
                   1132: void gen_simpup2_destructive(UP2,GEN_UP2);
                   1133: void gen_invup2(UP2,GEN_UP2,UP2 *);
                   1134: void gen_pwrmodup2(UP2,Q,GEN_UP2,UP2 *);
                   1135: void simpup2(UP2,UP2,UP2 *);
                   1136: int degup2(UP2);
                   1137: int degup2_sparse(UP2);
                   1138: int degup2_1(unsigned int);
                   1139: void addup2(UP2,UP2,UP2 *);
                   1140: void subup2(UP2,UP2,UP2 *);
                   1141: void mulup2_n1(unsigned int *,int,unsigned int,unsigned int *);
                   1142: void mulup2_nh(unsigned int *,int,unsigned int,unsigned int *);
                   1143: void _mulup2_1(UP2,unsigned int,UP2);
                   1144: void _mulup2_h(UP2,unsigned int,UP2);
                   1145: void mulup2(UP2,UP2,UP2 *);
                   1146: void _kmulup2_(unsigned int *,unsigned int *,int,unsigned int *);
                   1147: void _mulup2_nn(unsigned int *,unsigned int *,int,unsigned int *);
                   1148: void _mulup2(UP2,UP2,UP2);
                   1149: void _mulup2_(_UP2,_UP2,_UP2);
                   1150: void squareup2(UP2,UP2 *);
                   1151: void _adjup2(UP2);
                   1152: void _adjup2_(_UP2);
                   1153: void _addup2(UP2,UP2,UP2);
                   1154: void _addup2_destructive(UP2,UP2);
                   1155: void _addup2_(_UP2,_UP2,_UP2);
                   1156: void _addtoup2_(_UP2,_UP2);
                   1157: unsigned int mulup2_bb(unsigned int,unsigned int);
                   1158: void init_up2_tab(void);
                   1159: unsigned int quoup2_11(unsigned int,unsigned int);
                   1160: void divup2_1(unsigned int,unsigned int,int,int,unsigned int *,unsigned int *);
                   1161: void qrup2(UP2,UP2,UP2 *,UP2 *);
                   1162: void _qrup2(UP2,UP2,UP2,UP2);
                   1163: void remup2(UP2,UP2,UP2 *);
                   1164: void _remup2(UP2,UP2,UP2);
                   1165: void remup2_sparse(UP2,UP2,UP2 *);
                   1166: void remup2_sparse_destructive(UP2,UP2);
                   1167: void remup2_type1_destructive(UP2,int);
                   1168: void remup2_3_destructive(UP2,UP2);
                   1169: void remup2_5_destructive(UP2,UP2);
                   1170: void _invup2_1(unsigned int,unsigned int,unsigned int *,unsigned int *);
                   1171: void _gcdup2_1(unsigned int,unsigned int,unsigned int *);
                   1172: void up2_init_eg(void);
                   1173: void up2_show_eg(void);
                   1174: void invup2(UP2,UP2,UP2 *);
                   1175: void gcdup2(UP2,UP2,UP2 *);
                   1176: void chsgnup2(UP2,UP2 *);
                   1177: void pwrmodup2(UP2,Q,UP2,UP2 *);
                   1178: void pwrmodup2_sparse(UP2,Q,UP2,UP2 *);
                   1179: int compup2(UP2,UP2);
                   1180: void printup2(UP2);
                   1181: void _copyup2(UP2,UP2);
                   1182: void _bshiftup2(UP2,int,UP2);
                   1183: void _bshiftup2_destructive(UP2,int);
                   1184: void diffup2(UP2,UP2 *);
                   1185: int sqfrcheckup2(UP2);
                   1186: int irredcheckup2(UP2);
                   1187: int irredcheck_dddup2(UP2);
                   1188: void _copy_up2bits(UP2,unsigned int **,int);
                   1189: void _print_frobmat(unsigned int **,int,int);
                   1190: int compute_multiplication_matrix(P,GF2MAT *);
                   1191: void compute_change_of_basis_matrix(P,P,int,GF2MAT *,GF2MAT *);
                   1192: int compute_representation_conversion_matrix(P,GF2MAT *,GF2MAT *);
                   1193: void mul_nb(GF2MAT,unsigned int *,unsigned int *,unsigned int *);
                   1194: void leftshift(unsigned int *,int);
                   1195: void mat_to_gf2mat(MAT,unsigned int ***);
                   1196: void gf2mat_to_mat(unsigned int **,int,MAT *);
                   1197: void mulgf2mat(int,unsigned int **,unsigned int **,unsigned int **);
                   1198: void mulgf2vectmat(int,unsigned int *,unsigned int **,unsigned int *);
                   1199: int mulgf2vectvect(int,unsigned int *,unsigned int *);
                   1200: int invgf2mat(int,unsigned int **,unsigned int **);
                   1201: void _mulup2_11(unsigned int,unsigned int,unsigned int *);
                   1202: void _mulup2_22(unsigned int *,unsigned int *,unsigned int *);
                   1203: void _mulup2_33(unsigned int *,unsigned int *,unsigned int *);
                   1204: void _mulup2_44(unsigned int *,unsigned int *,unsigned int *);
                   1205: void _mulup2_55(unsigned int *,unsigned int *,unsigned int *);
                   1206: void _mulup2_66(unsigned int *,unsigned int *,unsigned int *);
                   1207: void printup2_(unsigned int *,int);
                   1208: void type1_bin_invup2(UP2,int,UP2 *);
                   1209: int int_bits(int);
                   1210:
                   1211:
                   1212: LUM LUMALLOC(int, int);
1.16      noro     1213: BM BMALLOC(int, int);
1.1       noro     1214: Obj ToAlg(Num);
                   1215: UM *berlemain(register int, UM, UM *);
                   1216: void *Risa_GC_malloc(size_t);
                   1217: void *Risa_GC_malloc_atomic(size_t);
                   1218: void *Risa_GC_realloc(void *,size_t);
                   1219: void *GC_malloc(size_t);
                   1220: void *GC_malloc_atomic(size_t);
                   1221: void *GC_realloc(void *,size_t);
                   1222: double NatToReal(N,int *);
                   1223: double RatnToReal(Q);
                   1224: double pwrreal0(double,int);
1.3       noro     1225: double rtodbl(); /* XXX */
1.1       noro     1226: int **almat(int,int);
                   1227: pointer **almat_pointer(int,int);
                   1228: int berlecnt(register int,UM);
                   1229: int berlecntmain(register int,int,int,register int **);
                   1230: int cmpalg(Num,Num);
                   1231: int cmpbf(Num,Num);
                   1232: int cmpcplx(Num,Num);
                   1233: int cmpn(N,N);
                   1234: int cmpq(Q,Q);
                   1235: int cmpreal(Real,Real);
                   1236: int cmpmi(MQ,MQ);
                   1237: int cmplm(LM,LM);
                   1238: int compmat(VL,MAT,MAT);
                   1239: int compnum(VL,Num,Num);
                   1240: int compp(VL,P,P);
                   1241: int compr(VL,Obj,Obj);
                   1242: int compstr(VL,STRING,STRING);
                   1243: int compvect(VL,VECT,VECT);
                   1244: int ctest(P,ML,int,int *);
                   1245: int cycchk(P);
                   1246: int dbound(V,P);
                   1247: int dcomp(P,P);
                   1248: int deg(V,P);
                   1249: int degtest(int,int *,ML,int);
                   1250: int divcheck(VL,P *,int,P,P);
                   1251: unsigned int divin(N,unsigned int,N *);
                   1252: int divtdcpz(VL,P,P,P *);
                   1253: int divtpz(VL,P,P,P *);
                   1254: int divum(register int,UM,UM,UM);
                   1255: int dm(int,int,int *);
                   1256: int dmb(int,int,int,int *);
                   1257: int dma(int,int,int,int *);
                   1258: int dmab(int,int,int,int,int *);
                   1259: int dmar(int,int,int,int);
                   1260: int dtestmain(P,Q,ML,int,int *,P *,P *);
                   1261: int geldb(VL,P);
                   1262: int getchomdeg(V,P);
                   1263: int getdeg(V,P);
                   1264: int getlchomdeg(V,P,int *);
1.29      noro     1265: int get_lprime(int);
1.1       noro     1266: int homdeg(P);
                   1267: unsigned int invm(unsigned int,int);
                   1268: int iscycm(P);
                   1269: int iscycp(P);
                   1270: int lengthp(P);
                   1271: int mig(int,int,P);
                   1272: int mignotte(int,P);
                   1273: int minimain(register int,int,int,register int **);
                   1274: int ncombi(int,int,int,int *);
                   1275: int nextbin(VN,int);
                   1276: int nmonop(P);
                   1277: int pcoef(VL,VL,P,P *);
                   1278: int pcoef0(VL,VL,P,P *);
                   1279: unsigned int pwrm(register int,register int,int);
1.29      noro     1280: unsigned int rem(N,int);
1.1       noro     1281: int sqfrchk(P);
                   1282: int subn(N,N,N *);
                   1283: int ucmpp(P,P);
                   1284: int valideval(VL,DCP,VN);
                   1285: int zerovpchk(VL,P,VN);
                   1286:
                   1287: void addgf2n(GF2N,GF2N,GF2N *);
                   1288: void subgf2n(GF2N,GF2N,GF2N *);
                   1289: void mulgf2n(GF2N,GF2N,GF2N *);
                   1290: void divgf2n(GF2N,GF2N,GF2N *);
                   1291: void chsgngf2n(GF2N,GF2N *);
                   1292: void pwrgf2n(GF2N,Q, GF2N *);
                   1293: int cmpgf2n(GF2N,GF2N);
                   1294:
                   1295: void addgfpn(GFPN,GFPN,GFPN *);
                   1296: void subgfpn(GFPN,GFPN,GFPN *);
                   1297: void mulgfpn(GFPN,GFPN,GFPN *);
                   1298: void divgfpn(GFPN,GFPN,GFPN *);
                   1299: void chsgngfpn(GFPN,GFPN *);
                   1300: void pwrgfpn(GFPN,Q, GFPN *);
                   1301: int cmpgfpn(GFPN,GFPN);
1.12      noro     1302:
                   1303: void addgfs(GFS,GFS,GFS *);
                   1304: void subgfs(GFS,GFS,GFS *);
                   1305: void mulgfs(GFS,GFS,GFS *);
                   1306: void divgfs(GFS,GFS,GFS *);
                   1307: void chsgngfs(GFS,GFS *);
                   1308: void pwrgfs(GFS,Q, GFS *);
                   1309: int cmpgfs(GFS,GFS);
1.20      noro     1310:
1.21      noro     1311: void addgfsn(GFSN,GFSN,GFSN *);
                   1312: void subgfsn(GFSN,GFSN,GFSN *);
                   1313: void mulgfsn(GFSN,GFSN,GFSN *);
                   1314: void divgfsn(GFSN,GFSN,GFSN *);
                   1315: void chsgngfsn(GFSN,GFSN *);
                   1316: void pwrgfsn(GFSN,Q, GFSN *);
                   1317: int cmpgfsn(GFSN,GFSN);
1.1       noro     1318:
                   1319: void addalg(Num,Num,Num *);
                   1320: void addbf(Num,Num,Num *);
                   1321: void addcplx(Num,Num,Num *);
                   1322: void addm2p(VL,Q,Q,P,P,P *);
                   1323: void addm2q(Q,Q,Q,Q,Q *);
                   1324: void addmat(VL,MAT,MAT,MAT *);
                   1325: void addmp(VL,int,P,P,P *);
                   1326: void addmpq(int,P,P,P *);
                   1327: void addmptoc(VL,int,P,P,P *);
                   1328: void addmq(int,MQ,MQ,MQ *);
                   1329: void addn(N,N,N *);
                   1330: void addnum(VL,Num,Num,Num *);
                   1331: void addp(VL,P,P,P *);
                   1332: void addpadic(int,int,unsigned int *,unsigned int *);
                   1333: void addpq(P,P,P *);
                   1334: void addptoc(VL,P,P,P *);
                   1335: void addq(Q,Q,Q *);
                   1336: void addr(VL,Obj,Obj,Obj *);
                   1337: void addreal(Num,Num,Real *);
                   1338: void addmi(MQ,MQ,MQ *);
                   1339: void addlm(LM,LM,LM *);
                   1340: void addstr(VL,STRING,STRING,STRING *);
                   1341: void addum(int,UM,UM,UM);
                   1342: void addvect(VL,VECT,VECT,VECT *);
1.19      noro     1343: void addquote(VL,QUOTE,QUOTE,QUOTE *);
1.1       noro     1344: void adjc(VL,P,P,P,Q,P *,P *);
                   1345: void afctr(VL,P,P,DCP *);
                   1346: void afctrmain(VL,P,P,int,DCP *);
                   1347: void affine(VL,P,VN,P *);
                   1348: void affinemain(VL,P,V,int,P *,P *);
                   1349: void berle(int,int,P,ML *);
                   1350: void bnton(register int,N,N *);
                   1351: void cbound(VL,P,Q *);
                   1352: void chnrem(int,V,P,Q,UM,P *,Q *);
                   1353: void chnremp(VL,int,P,Q,P,P *);
                   1354: void chsgnalg(Num,Num *);
                   1355: void chsgnbf(Num a,Num *);
                   1356: void chsgncplx(Num,Num *);
                   1357: void chsgnmat(MAT,MAT *);
                   1358: void chsgnmp(int,P,P *);
                   1359: void chsgnnum(Num,Num *);
                   1360: void chsgnp(P,P *);
                   1361: void chsgnq(Q,Q *);
                   1362: void chsgnr(Obj,Obj *);
                   1363: void chsgnreal(Num,Num *);
                   1364: void chsgnmi(MQ,MQ *);
                   1365: void chsgnlm(LM,LM *);
                   1366: void chsgnvect(VECT,VECT *);
1.19      noro     1367: void chsgnquote(QUOTE,QUOTE *);
1.1       noro     1368: void clctv(VL,P,VL *);
                   1369: void clctvr(VL,Obj,VL *);
                   1370: void cm2p(Q,Q,P,P *);
                   1371: void cmax(P,Q *);
                   1372: void cmp(Q,P,P *);
                   1373: void coefp(P,int,P *);
                   1374: void cpylum(int,LUM,LUM);
                   1375: void cpyum(UM,UM);
                   1376: void csump(VL,P,Q *);
                   1377: void cycm(V,register int,DCP *);
                   1378: void cycp(V,register int,DCP *);
                   1379: void degp(V,P,Q *);
                   1380: void degum(UM,int);
                   1381: void detmp(VL,int,P **,int,P *);
                   1382: void detp(VL,P **,int,P *);
                   1383: void diffp(VL,P,V,P *);
                   1384: void diffum(register int,UM,UM);
                   1385: void divalg(Num,Num,Num *);
                   1386: void divbf(Num,Num,Num *);
                   1387: void divcp(P,Q,P *);
                   1388: void divcplx(Num,Num,Num *);
                   1389: void divmat(VL,Obj,Obj,Obj *);
                   1390: void divmq(int,MQ,MQ,MQ *);
                   1391: void divn(N,N,N *,N *);
                   1392: void divnmain(int,int,unsigned int *,unsigned int *,unsigned int *);
                   1393: void divnum(VL,Num,Num,Num *);
                   1394: void divq(Q,Q,Q *);
                   1395: void divr(VL,Obj,Obj,Obj *);
                   1396: void divreal(Num,Num,Real *);
                   1397: void divmi(MQ,MQ,MQ *);
                   1398: void divlm(LM,LM,LM *);
                   1399: void divsdcmp(VL,int,P,P,P *);
                   1400: void divsdcp(VL,P,P,P *);
                   1401: void divsmp(VL,int,P,P,P *);
                   1402: void divsn(N,N,N *);
                   1403: void divsp(VL,P,P,P *);
                   1404: void divsrdcmp(VL,int,P,P,P *,P *);
                   1405: void divsrdcp(VL,P,P,P *,P *);
                   1406: void divsrmp(VL,int,P,P,P *,P *);
                   1407: void divsrp(VL,P,P,P *,P *);
                   1408: void divvect(VL,Obj,Obj,Obj *);
1.19      noro     1409: void divquote(VL,QUOTE,QUOTE,QUOTE *);
1.1       noro     1410: void dtest(P,ML,int,DCP *);
                   1411: void dtestroot(int,int,P,LUM,struct oDUM *,DCP *);
                   1412: void dtestroot1(int,int,P,LUM,P *);
                   1413: void dtestsq(int,int,P,LUM,P *);
                   1414: void dtestsql(P,ML,struct oDUM *,DCP *);
                   1415: void estimatelc(VL,Q,DCP,VN,P *);
                   1416: void eucum(register int,UM,UM,UM,UM);
                   1417: void exthp(VL,P,int,P *);
                   1418: void exthpc(VL,V,P,int,P *);
                   1419: void ezgcd1p(VL,P,P,P *);
                   1420: void ezgcdhensel(P,int,UM,UM,ML *);
                   1421: void ezgcdnp(VL,P,P *,int,P *);
                   1422: void ezgcdnpp(VL,DCP,P *,int,P *);
                   1423: void ezgcdnpz(VL,P *,int,P *);
                   1424: void ezgcdp(VL,P,P,P *);
                   1425: void ezgcdpp(VL,DCP,P,P *);
                   1426: void ezgcdpz(VL,P,P,P *);
                   1427: void factorial(int,Q *);
                   1428: void fctrp(VL,P,DCP *);
                   1429: void fctrwithmvp(VL,P,V,DCP *);
                   1430: void gcda(VL,P,P,P,P *);
                   1431: void gcdcp(VL,P,P *);
                   1432: void gcdgen(P,ML,ML *);
                   1433: void gcdmonomial(VL,DCP *,int,P *);
                   1434: void gcdn(N,N,N *);
                   1435: void gcdprsp(VL,P,P,P *);
                   1436: void gcdum(register int,UM,UM,UM);
                   1437: void getmindeg(V,P,Q *);
                   1438: void henmain(LUM,ML,ML,ML *);
                   1439: void henmv(VL,VN,P,P,P,P,P,P,P,P,P,Q,int,P *,P *);
                   1440: void henmvmain(VL,VN,P,P,P,P,P,P,P,Q,Q,int,P *,P *);
                   1441: void henprep(P,ML,ML,ML *,ML *);
                   1442: void hensel(int,int,P,ML *);
                   1443: void henzq(P,P,UM,P,UM,int,int,P *,P *,P *,P *,Q *);
                   1444: void henzq1(P,P,Q,P *,P *,Q *);
                   1445: void hsq(int,int,P,int *,DCP *);
                   1446: void intersectv(VL,VL,VL *);
                   1447: void invl(Q,Q,Q *);
                   1448: void invmq(int,MQ,MQ *);
                   1449: void invq(Q,Q *);
                   1450: void lgp(P,N *,N *);
                   1451: void lumtop(V,int,int,LUM,P *);
                   1452: void markv(VN,int,P);
                   1453: void maxdegp(VL,P,VL *,P *);
                   1454: void mergev(VL,VL,VL,VL *);
                   1455: void mfctr(VL,P,DCP *);
                   1456: void mfctrhen2(VL,VN,P,P,P,P,P,P,P *);
                   1457: void mfctrmain(VL,P,DCP *);
                   1458: void mfctrwithmv(VL,P,V,DCP *);
                   1459: void min_common_vars_in_coefp(VL,P,VL *,P *);
                   1460: void minchdegp(VL,P,VL *,P *);
                   1461: void mindegp(VL,P,VL *,P *);
                   1462: void mini(register int,UM,UM);
                   1463: void minlcdegp(VL,P,VL *,P *);
                   1464: void mkbc(int,Q *);
                   1465: void mkbcm(int,int,MQ *);
                   1466: void mkssum(V,int,int,int,P *);
                   1467: void monomialfctr(VL,P,P *,DCP *);
                   1468: void mptop(P,P *);
                   1469: void mptoum(P,UM);
                   1470: void msqfr(VL,P,DCP *);
                   1471: void msqfrmain(VL,P,DCP *);
                   1472: void msqfrmainmain(VL,P,VN,P,DCP,DCP *,P *);
                   1473: void mulalg(Num,Num,Num *);
                   1474: void mulbf(Num,Num,Num *);
                   1475: void mulcplx(Num,Num,Num *);
                   1476: void mulin(N,unsigned int,unsigned int *);
                   1477: void mullum(int,int,LUM,LUM,LUM);
                   1478: void mullumarray(P,ML,int,int *,P *);
                   1479: void mulm2p(VL,Q,Q,P,P,P *);
                   1480: void mulm2q(Q,Q,Q,Q,Q *);
                   1481: void mulmat(VL,Obj,Obj,Obj *);
                   1482: void mulmatmat(VL,MAT,MAT,MAT *);
                   1483: void mulmatvect(VL,MAT,VECT,VECT *);
                   1484: void mulmp(VL,int,P,P,P *);
                   1485: void mulmpc(VL,int,P,P,P *);
                   1486: void mulmpq(int,P,P,P *);
                   1487: void mulmq(int,MQ,MQ,MQ *);
                   1488: void muln(N,N,N *);
                   1489: void mulnum(VL,Num,Num,Num *);
                   1490: void mulp(VL,P,P,P *);
                   1491: void mulpadic(int,int,unsigned int *,unsigned int *,unsigned int *);
                   1492: void mulpc(VL,P,P,P *);
                   1493: void mulpq(P,P,P *);
                   1494: void mulq(Q,Q,Q *);
                   1495: void mulr(VL,Obj,Obj,Obj *);
                   1496: void mulreal(Num,Num,Real *);
                   1497: void mulmi(MQ,MQ,MQ *);
                   1498: void mullm(LM,LM,LM *);
                   1499: void mulrmat(VL,Obj,MAT,MAT *);
                   1500: void mulrvect(VL,Obj,VECT,VECT *);
                   1501: void mulsgn(VN,VN,int,VN);
                   1502: void mulsum(register int,UM,register int,UM);
                   1503: void mulum(register int,UM,UM,UM);
                   1504: void mulvect(VL,Obj,Obj,Obj *);
1.19      noro     1505: void mulquote(VL,QUOTE,QUOTE,QUOTE *);
1.1       noro     1506: void mulvectmat(VL,VECT,MAT,VECT *);
                   1507: void next(VN);
                   1508: void nezgcdnp_sqfr_primitive(VL,P,P *,int,P *);
                   1509: void nezgcdnpp(VL,DCP,P *,int,P *);
                   1510: void nezgcdnpz(VL,P *,int,P *);
                   1511: void nezgcdnpzmain(VL,P *,int,P *);
                   1512: void nglob_init(void);
                   1513: void norm(P,Q *);
                   1514: void norm1(P,P *);
                   1515: void norm1c(P,Q *);
                   1516: void normalizemp(int,P);
                   1517: void nthrootchk(P,struct oDUM *,ML,DCP *);
                   1518: void nthrootn(N,int,N *);
                   1519: void ntobn(register int,N,N *);
                   1520: void nuezgcdnpzmain(VL,P *,int,P *);
                   1521: void padictoq(int,int,int *,Q *);
                   1522: void risa_pari_init(void);
                   1523: void pcp(VL,P,P *,P *);
                   1524: void pderivr(VL,Obj,V,Obj *);
                   1525: void pdiva(VL,P,P,P,P *);
                   1526: void pinva(P,P,P *);
                   1527: void plisttop(P *,V,int,P *);
                   1528: void pmonic(VL,P,P,P *);
                   1529: void pqra(VL,P,P,P,P *,P *);
                   1530: void premmp(VL,int,P,P,P *);
                   1531: void premp(VL,P,P,P *);
                   1532: void ptolum(int,int,P,LUM);
                   1533: void ptomp(int,P,P *);
                   1534: void ptoum(int,P,UM);
                   1535: void ptozp(P,int,Q *,P *);
                   1536: void ptozp0(P,P *);
                   1537: void pwralg(Num,Num,Num *);
                   1538: void pwrbf(Num,Num,Num *);
                   1539: void pwrcplx(Num,Num,Num *);
                   1540: void pwrcplx0(Num,int,Num *);
                   1541: void pwrlum(int,int,LUM,int,LUM);
                   1542: void pwrmat(VL,MAT,Obj,MAT *);
                   1543: void pwrmatmain(VL,MAT,int,MAT *);
                   1544: void pwrmp(VL,int,P,Q,P *);
                   1545: void pwrmq(int,MQ,Q,MQ *);
                   1546: void pwrn(N,int,N *);
                   1547: void pwrnum(VL,Num,Num,Num *);
                   1548: void pwrp(VL,P,Q,P *);
                   1549: void pwrq(Q,Q,Q *);
                   1550: void pwrr(VL,Obj,Obj,Obj *);
1.19      noro     1551: void pwrquote(VL,QUOTE,QUOTE,QUOTE *);
1.1       noro     1552: void pwrreal(Num,Num,Real *);
                   1553: void pwrmi(MQ,Q,MQ *);
                   1554: void pwrlm(LM,Q,LM *);
                   1555: void pwrum(int,UM,int,UM);
                   1556: void reallocarray(char **,int *,int *,int);
                   1557: void reductr(VL,Obj,Obj *);
                   1558: void reimtocplx(Num,Num,Num *);
                   1559: void rem2q(Q,Q,Q,Q *);
                   1560: void rema(VL,P,P,P,P *);
                   1561: void remq(Q,Q,Q *);
                   1562: void remsdcp(VL,P,P,P *);
                   1563: void reordermp(VL,int,VL,P,P *);
                   1564: void reorderp(VL,VL,P,P *);
                   1565: void reordvar(VL,V,VL *);
                   1566: void res_ch_det(VL,V,P,P,P *);
                   1567: void res_detmp(VL,int,V,P,P,P *);
                   1568: void restore(VL,P,VN,P *);
                   1569: void resultmp(VL,int,V,P,P,P *);
                   1570: void resultp(VL,V,P,P,P *);
                   1571: void setlum(int,int,LUM);
                   1572: void sort_by_deg(int,P *,P *);
                   1573: void sort_by_deg_rev(int,P *,P *);
                   1574: void sortfs(DCP *);
                   1575: void sortfsrev(DCP *);
                   1576: void sortplist(P *,int);
                   1577: void sortplistbyhomdeg(P *,int);
                   1578: void sprs(VL,V,P,P,P *);
                   1579: void sqa(VL,P,P,DCP *);
                   1580: void sqad(unsigned int,int);
                   1581: void sqfrp(VL,P,DCP *);
                   1582: void sqfrum(int,int,P,int *,struct oDUM **,ML *);
                   1583: void sqfrummain(int,UM,UM,struct oDUM **);
                   1584: void sqrtn(N,N *);
                   1585: void srch2(VL,V,P,P,P *);
                   1586: void srchmp(VL,int,V,P,P,P *);
                   1587: void srchump(int,P,P,P *);
                   1588: void srcr(VL,V,P,P,P *);
                   1589: void strtobf(char *,BF *);
                   1590: void subalg(Num,Num,Num *);
                   1591: void subbf(Num,Num,Num *);
                   1592: void subcplx(Num,Num,Num *);
                   1593: void subm2p(VL,Q,Q,P,P,P *);
                   1594: void subm2q(Q,Q,Q,Q,Q *);
                   1595: void submat(VL,MAT,MAT,MAT *);
                   1596: void submp(VL,int,P,P,P *);
                   1597: void submq(int,MQ,MQ,MQ *);
                   1598: void subnum(VL,Num,Num,Num *);
                   1599: void subp(VL,P,P,P *);
                   1600: void subq(Q,Q,Q *);
                   1601: void subr(VL,Obj,Obj,Obj *);
                   1602: void subreal(Num,Num,Real *);
                   1603: void submi(MQ,MQ,MQ *);
                   1604: void sublm(LM,LM,LM *);
                   1605: void substmp(VL,int,P,V,P,P *);
                   1606: void substp(VL,P,V,P,P *);
                   1607: void substvp(VL,P,VN,P *);
                   1608: void subum(int,UM,UM,UM);
                   1609: void subvect(VL,VECT,VECT,VECT *);
1.19      noro     1610: void subquote(VL,QUOTE,QUOTE,QUOTE *);
1.1       noro     1611: void toreim(Num,Num *,Num *);
                   1612: void ucsump(P,Q *);
                   1613: void udivpwm(Q,P,P,P *,P *);
                   1614: void udivpz(P,P,P *,P *);
                   1615: void udivpzwm(Q,P,P,P *,P *);
                   1616: void uexgcdnp(VL,P,P *,int,VN,Q,P *,P *,P *,P *,Q *);
                   1617: void uezgcd1p(P,P,P *);
                   1618: void uezgcdpp(DCP,P,P *);
                   1619: void uezgcdpz(VL,P,P,P *);
                   1620: void ufctr(P,int,DCP *);
                   1621: void ufctrmain(P,int,DCP *);
                   1622: void umtomp(V,UM,P *);
                   1623: void umtop(V,UM,P *);
                   1624: void usqp(P,DCP *);
                   1625: void vntovl(VN,int,VL *);
1.29      noro     1626:
                   1627: void saveerror(FILE *,ERR);
                   1628: void saveui(FILE *,USINT);
                   1629: void savedp(FILE *,DP);
                   1630: void savestring(FILE *,STRING);
                   1631: void savemat(FILE *,MAT);
                   1632: void savevect(FILE *,VECT);
                   1633: void savelist(FILE *,LIST);
                   1634: void saver(FILE *,R);
                   1635: void savep(FILE *,P);
                   1636: void savegf2n(FILE *,GF2N);
                   1637: void savegfpn(FILE *,GFPN);
                   1638: void savegfs(FILE *,GFS);
                   1639: void savelm(FILE *,LM);
                   1640: void savemi(FILE *,MQ);
                   1641: void savecplx(FILE *,C);
                   1642: void savebf(FILE *,BF);
                   1643: void savereal(FILE *,Real);
                   1644: void saveq(FILE *,Q);
                   1645: void savenum(FILE *,Num);
                   1646: void savepfins(FILE *,V);
                   1647: void savegfmmat(FILE *,GFMMAT);
                   1648: void savebytearray(FILE *,BYTEARRAY);
                   1649: void savegfsn(FILE *,GFSN);
                   1650:
                   1651: void loaderror(FILE *,ERR *);
                   1652: void loadui(FILE *,USINT *);
                   1653: void loaddp(FILE *,DP *);
                   1654: void loadstring(FILE *,STRING *);
                   1655: void loadmat(FILE *,MAT *);
                   1656: void loadvect(FILE *,VECT *);
                   1657: void loadlist(FILE *,LIST *);
                   1658: void loadr(FILE *,R *);
                   1659: void loadp(FILE *,P *);
                   1660: void loadgf2n(FILE *,GF2N *);
                   1661: void loadgfpn(FILE *,GFPN *);
                   1662: void loadgfs(FILE *,GFS *);
                   1663: void loadgfsn(FILE *,GFSN *);
                   1664: void loadlm(FILE *,LM *);
                   1665: void loadmi(FILE *,MQ *);
                   1666: void loadcplx(FILE *,C *);
                   1667: void loadbf(FILE *,BF *);
                   1668: void loadreal(FILE *,Real *);
                   1669: void loadq(FILE *,Q *);
                   1670: void loadnum(FILE *,Num *);
                   1671: void loadgfmmat(FILE *,GFMMAT *);
                   1672: void loadbytearray(FILE *,BYTEARRAY *);
                   1673: V loadpfins(FILE *);
                   1674: void eucum2(int mod,UM f1,UM f2,UM a,UM b);
                   1675: void clearum(UM p,int n);
                   1676: BM BMALLOC(int dx,int dy);
                   1677: int isequalum(UM f1,UM f2);
                   1678: void dec_um(int p,int a,UM u);
                   1679: void setmod_sf(int p,int n);
                   1680: int search_defpoly_and_primitive_root(int p,int n,UM dp);
                   1681: void generate_defpoly_um(int p,int n,UM dp);
                   1682: int generate_primitive_root_enc(int p,int n,UM dp);
                   1683: int mulremum_enc(int p,int n,UM dp,int a,int b);
                   1684: void gfs_galois_action(GFS a,Q e,GFS *c);
                   1685: void gfs_embed(GFS z,int k,int pm,GFS *c);
                   1686: void qtogfs(Q a,GFS *c);
                   1687: void mqtogfs(MQ a,GFS *c);
                   1688: void gfstomq(GFS a,MQ *c);
                   1689: void ntogfs(Obj a,GFS *b);
                   1690: void addgfs(GFS a,GFS b,GFS *c);
                   1691: void subgfs(GFS a,GFS b,GFS *c);
                   1692: void mulgfs(GFS a,GFS b,GFS *c);
                   1693: void divgfs(GFS a,GFS b,GFS *c);
                   1694: void chsgngfs(GFS a,GFS *c);
                   1695: void pwrgfs(GFS a,Q b,GFS *c);
                   1696: int cmpgfs(GFS a,GFS b);
                   1697: void randomgfs(GFS *r);
                   1698: int _addsf(int a,int b);
                   1699: int _chsgnsf(int a);
                   1700: int _subsf(int a,int b);
                   1701: int _mulsf(int a,int b);
                   1702: int _invsf(int a);
                   1703: int _divsf(int a,int b);
                   1704: int _pwrsf(int a,int b);
                   1705: int _onesf();
                   1706: int _itosf(int n);
                   1707: int _isonesf(int a);
                   1708: int _randomsf();
                   1709: int field_order_sf();
                   1710: int characteristic_sf();
                   1711: int extdeg_sf();
                   1712: void addsfum(UM p1,UM p2,UM pr);
                   1713: void subsfum(UM p1,UM p2,UM pr);
                   1714: void gcdsfum(UM p1,UM p2,UM pr);
                   1715: void mulsfum(UM p1,UM p2,UM pr);
                   1716: void mulssfum(UM p,int n,UM pr);
                   1717: void kmulsfum(UM n1,UM n2,UM nr);
                   1718: void kmulsfummain(UM n1,UM n2,UM nr);
                   1719: int divsfum(UM p1,UM p2,UM pq);
                   1720: void diffsfum(UM f,UM fd);
                   1721: void monicsfum(UM f);
                   1722: int compsfum(UM a,UM b);
                   1723: void mulsfbm(BM f1,BM f2,BM fr);
                   1724: int degbm(BM f);
                   1725: void addtosfbm(BM f,BM g);
                   1726: void eucsfum(UM f1,UM f2,UM a,UM b);
                   1727: void shiftsfum(UM f,int a,UM g);
                   1728: void shiftsflum(int n,LUM f,int ev);
                   1729: void shiftsfbm(BM f,int a);
                   1730: void clearbm(int n,BM f);
                   1731:
                   1732: void ksquareum(int mod,UM n1,UM nr);
                   1733: void extractum(UM n,int index,int len,UM nr);
                   1734: void copyum(UM n1,UM n2);
                   1735: void c_copyum(UM n,int len,int *p);
                   1736: void kmulummain(int mod,UM n1,UM n2,UM nr);
                   1737: void ksquareummain(int mod,UM n1,UM nr);
                   1738:
                   1739: void simp_ff(Obj p,Obj *rp);
                   1740: void field_order_ff(N *order);
                   1741:
                   1742: void random_lm(LM *r);
                   1743: void ntosparsen(N p,N *bits);
                   1744: void setmod_lm(N p);
                   1745: void getmod_lm(N *p);
                   1746: void simplm(LM n,LM *r);
                   1747: void qtolm(Q q,LM *l);
                   1748: void addlm(LM a,LM b,LM *c);
                   1749: void sublm(LM a,LM b,LM *c);
                   1750: void mullm(LM a,LM b,LM *c);
                   1751: void divlm(LM a,LM b,LM *c);
                   1752: void chsgnlm(LM a,LM *c);
                   1753: void pwrlm(LM a,Q b,LM *c);
                   1754: void pwrlm0(N a,N n,N *c);
                   1755: int cmplm(LM a,LM b);
                   1756: void remn_special(N,N,int,unsigned int ,N *);;
                   1757: void gen_simpn(N a,N *b);
                   1758: void gen_simpn_force(N a,N *b);
                   1759: void setmod_gfpn(P p);
                   1760: void getmod_gfpn(UP *up);
                   1761: void ptogfpn(Obj q,GFPN *l);
                   1762: void gfpntop(GFPN q,P *l);
                   1763: void simpgfpn(GFPN n,GFPN *r);
                   1764: void ntogfpn(Obj a,GFPN *b);
                   1765: void addgfpn(GFPN a,GFPN b,GFPN *c);
                   1766: void subgfpn(GFPN a,GFPN b,GFPN *c);
                   1767: void mulgfpn(GFPN a,GFPN b,GFPN *c);
                   1768: void squaregfpn(GFPN a,GFPN *c);
                   1769: void divgfpn(GFPN a,GFPN b,GFPN *c);
                   1770: void invgfpn(GFPN b,GFPN *c);
                   1771: void chsgngfpn(GFPN a,GFPN *c);
                   1772: void pwrgfpn(GFPN a,Q b,GFPN *c);
                   1773: int cmpgfpn(GFPN a,GFPN b);
                   1774: void randomgfpn(GFPN *r);
                   1775: void setmod_gfsn(UM p);
                   1776: void getmod_gfsn(UM *up);
                   1777: void simpgfsn(GFSN n,GFSN *r);
                   1778: void ntogfsn(Obj a,GFSN *b);
                   1779: void addgfsn(GFSN a,GFSN b,GFSN *c);
                   1780: void subgfsn(GFSN a,GFSN b,GFSN *c);
                   1781: void mulgfsn(GFSN a,GFSN b,GFSN *c);
                   1782: void divgfsn(GFSN a,GFSN b,GFSN *c);
                   1783: void invgfsn(GFSN b,GFSN *c);
                   1784: void chsgngfsn(GFSN a,GFSN *c);
                   1785: void pwrgfsn(GFSN a,Q b,GFSN *c);
                   1786: int cmpgfsn(GFSN a,GFSN b);
                   1787: void randomgfsn(GFSN *r);
                   1788: void setmod_gf2n(P p);
                   1789: void getmod_gf2n(UP2 *p);
                   1790: void simpgf2n(GF2N n,GF2N *r);
                   1791: void ptogf2n(Obj q,GF2N *l);
                   1792: void gf2ntop(GF2N q,P *l);
                   1793: void gf2ntovect(GF2N q,VECT *l);
                   1794: void addgf2n(GF2N a,GF2N b,GF2N *c);
                   1795: void subgf2n(GF2N a,GF2N b,GF2N *c);
                   1796: void mulgf2n(GF2N a,GF2N b,GF2N *c);
                   1797: void squaregf2n(GF2N a,GF2N *c);
                   1798: void divgf2n(GF2N a,GF2N b,GF2N *c);
                   1799: void invgf2n(GF2N b,GF2N *c);
                   1800: void chsgngf2n(GF2N a,GF2N *c);
                   1801: void pwrgf2n(GF2N a,Q b,GF2N *c);
                   1802: int cmpgf2n(GF2N a,GF2N b);
                   1803: void randomgf2n(GF2N *r);
                   1804: void binaryton(char *binary,N *np);
                   1805: void hexton(char *hex,N *np);
                   1806: void ntobn(int base,N n,N *nrp);
                   1807: void bnton(int base,N n,N *nrp);
                   1808: void ptomp(int m,P p,P *pr);
                   1809: void mptop(P f,P *gp);
                   1810: void ptosfp(P p,P *pr);
                   1811: void sfptop(P f,P *gp);
                   1812: void sf_galois_action(P p,Q e,P *pr);
                   1813: void sf_embed(P p,int k,int pm,P *pr);
                   1814: void ptolmp(P p,P *pr);
                   1815: void lmptop(P f,P *gp);
                   1816: void ptoum(int m,P f,UM wf);
                   1817: void umtop(V v,UM w,P *f);
                   1818: void ptosfum(P f,UM wf);
                   1819: void sfumtop(V v,UM w,P *f);
                   1820: void ptoup(P n,UP *nr);
                   1821: void uptop(UP n,P *nr);
                   1822: void ulmptoum(int m,UP f,UM wf);
                   1823: void objtobobj(int base,Obj p,Obj *rp);
                   1824: void bobjtoobj(int base,Obj p,Obj *rp);
                   1825: void numtobnum(int base,Num p,Num *rp);
                   1826: void bnumtonum(int base,Num p,Num *rp);
                   1827: void ptobp(int base,P p,P *rp);
                   1828: void bptop(int base,P p,P *rp);
                   1829: void listtoblist(int base,LIST p,LIST *rp);
                   1830: void blisttolist(int base,LIST p,LIST *rp);
                   1831: void vecttobvect(int base,VECT p,VECT *rp);
                   1832: void bvecttovect(int base,VECT p,VECT *rp);
                   1833: void mattobmat(int base,MAT p,MAT *rp);
                   1834: void bmattomat(int base,MAT p,MAT *rp);
                   1835: void n32ton27(N g,N *rp);
                   1836: void n27ton32(N a,N *rp);
                   1837: void mptoum(P p,UM pr);
                   1838: void umtomp(V v,UM p,P *pr);
                   1839: void enc_to_p(int p,int a,V v,P *pr);
                   1840: int comp_dum(DUM a,DUM b);
                   1841: void fctrsf(P p,DCP *dcp);
                   1842: void gensqfrsfum(UM p,struct oDUM *dc);
                   1843: void randsfum(int d,UM p);
                   1844: void pwrmodsfum(UM p,int e,UM f,UM pr);
                   1845: void spwrsfum(UM m,UM f,N e,UM r);
                   1846: void tracemodsfum(UM m,UM f,int e,UM r);
                   1847: void make_qmatsf(UM p,UM *tab,int ***mp);
                   1848: void nullsf(int **mat,int n,int *ind);
                   1849: void null_to_solsf(int **mat,int *ind,int n,UM *r);
                   1850: void czsfum(UM f,UM *r);
                   1851: int berlekampsf(UM p,int df,UM *tab,UM *r);
                   1852: void minipolysf(UM f,UM p,UM mp);
                   1853: int find_rootsf(UM p,int *root);
                   1854: void canzassf(UM f,int d,UM *r);
1.30    ! noro     1855: void sfhensel(int count,P f,V x,int degbound,GFS *evp,P *sfp,ML *listp);
1.29      noro     1856: int sfberle(VL vl,P f,int count,GFS *ev,DCP *dcp);
                   1857: void sfgcdgen(P f,ML blist,ML *clistp);
                   1858: void sfhenmain2(BM f,UM g0,UM h0,int dy,BM *gp);
                   1859: void ptosfbm(int dy,P f,BM fl);
                   1860: void sfbmtop(BM f,V x,V y,P *fp);
                   1861: void sfsqfr(P f,DCP *dcp);
                   1862: void sfusqfr(P f,DCP *dcp);
                   1863: void sfbsqfr(P f,V x,V y,DCP *dcp);
1.30    ! noro     1864: void sfbfctr(P f,V x,V y,int degbound,DCP *dcp);
1.29      noro     1865: void sfdtest(P f,ML list,V x,V y,DCP *dcp);
                   1866: int sfdtestmain(VL vl,P lcg,UM lcg0,BM lcy,P csum,ML list,
                   1867:        int k,int *in,P *fp,P *cofp);
                   1868: void const_term(P f,UM c);
                   1869: void const_term_sfbm(BM f,UM c);
                   1870: int sfctest(UM lcg0,BM lcy,ML list,int k,int *in);
                   1871: void mulsfbmarray(int dx,BM lcy,ML list,int k,int *in,V x,V y,P *g);
                   1872: void sfcsump(VL vl,P f,P *s);
                   1873: void cont_pp_sfp(VL vl,P f,P *cp,P *fp);
                   1874: int divtp_by_sfbm(VL vl,P f,P g,P *qp);
                   1875: void generate_defpoly_sfum(int n,UM *dp);
                   1876: NODE symb_merge(NODE,NODE,int);
                   1877: void _free_private_storage();
                   1878: void _DL_alloc();
                   1879: void _MP_alloc();
                   1880: void _DP_alloc();
                   1881: void _addmd_destructive(int mod,DP p1,DP p2,DP *pr);
                   1882: void _mulmd_dup(int mod,DP p1,DP p2,DP *pr);
                   1883: void _comm_mulmd_dup(int mod,DP p1,DP p2,DP *pr);
                   1884: void _weyl_mulmd_dup(int mod,DP p1,DP p2,DP *pr);
                   1885: void _mulmdm_dup(int mod,DP p,MP m0,DP *pr);
                   1886: void _weyl_mulmdm_dup(int mod,MP m0,DP p,DP *pr);
                   1887: void _weyl_mulmmm_dup(int mod,MP m0,MP m1,int n,struct cdlm *rtab,int rtablen);
                   1888: void _comm_mulmd_tab(int mod,int nv,struct cdlm *t,int n,struct cdlm *t1,int n1,struct cdlm *rt);
                   1889: void _comm_mulmd_tab_destructive(int mod,int nv,struct cdlm *t,int n,struct cdlm *t1,int n1);
                   1890: void dlto_dl(DL d,DL *dr);
                   1891: void _dltodl(DL d,DL *dr);
                   1892: void _adddl_dup(int n,DL d1,DL d2,DL *dr);
                   1893: void _free_dlarray(DL *a,int n);
                   1894: void _free_dp(DP f);
                   1895: void dpto_dp(DP p,DP *r);
                   1896: void _dptodp(DP p,DP *r);
                   1897: NODE _symb_merge(NODE m1,NODE m2,int n);
                   1898: void _addd_destructive(VL vl,DP p1,DP p2,DP *pr);
                   1899: void _muld_dup(VL vl,DP p1,DP p2,DP *pr);
                   1900: void _comm_muld_dup(VL vl,DP p1,DP p2,DP *pr);
                   1901: void _weyl_muld_dup(VL vl,DP p1,DP p2,DP *pr);
                   1902: void _muldm_dup(VL vl,DP p,MP m0,DP *pr);
                   1903: void _weyl_muldm_dup(VL vl,MP m0,DP p,DP *pr);
                   1904: void _weyl_mulmm_dup(VL vl,MP m0,MP m1,int n,struct cdl *rtab,int rtablen);
                   1905: void _comm_muld_tab(VL vl,int nv,struct cdl *t,int n,struct cdl *t1,int n1,struct cdl *rt);
                   1906: void _comm_muld_tab_destructive(VL vl,int nv,struct cdl *t,int n,struct cdl *t1,int n1);
                   1907:
                   1908: int has_fcoef(DP f);
                   1909: int has_fcoef_p(P f);
                   1910: void initd(struct order_spec *spec);
                   1911: void ptod(VL vl,VL dvl,P p,DP *pr);
                   1912: void dtop(VL vl,VL dvl,DP p,P *pr);
                   1913: void nodetod(NODE node,DP *dp);
                   1914: int sugard(MP m);
                   1915: void addd(VL vl,DP p1,DP p2,DP *pr);
                   1916: void symb_addd(DP p1,DP p2,DP *pr);
                   1917: NODE symb_merge(NODE m1,NODE m2,int n);
                   1918: DLBUCKET symb_merge_bucket(DLBUCKET m1,DLBUCKET m2,int n);
                   1919: void subd(VL vl,DP p1,DP p2,DP *pr);
                   1920: void chsgnd(DP p,DP *pr);
                   1921: void muld(VL vl,DP p1,DP p2,DP *pr);
                   1922: void comm_muld(VL vl,DP p1,DP p2,DP *pr);
                   1923: void muldm(VL vl,DP p,MP m0,DP *pr);
                   1924: void weyl_muld(VL vl,DP p1,DP p2,DP *pr);
                   1925: void weyl_muldm(VL vl,MP m0,DP p,DP *pr);
                   1926: void weyl_mulmm(VL vl,MP m0,MP m1,int n,struct cdl *rtab,int rtablen);
                   1927: void comm_muld_tab(VL vl,int nv,struct cdl *t,int n,struct cdl *t1,int n1,struct cdl *rt);
                   1928: void muldc(VL vl,DP p,P c,DP *pr);
                   1929: void divsdc(VL vl,DP p,P c,DP *pr);
                   1930: void adddl(int n,DL d1,DL d2,DL *dr);
                   1931: void adddl_destructive(int n,DL d1,DL d2);
                   1932: int compd(VL vl,DP p1,DP p2);
                   1933: int cmpdl_lex(int n,DL d1,DL d2);
                   1934: int cmpdl_revlex(int n,DL d1,DL d2);
                   1935: int cmpdl_gradlex(int n,DL d1,DL d2);
                   1936: int cmpdl_revgradlex(int n,DL d1,DL d2);
                   1937: int cmpdl_blex(int n,DL d1,DL d2);
                   1938: int cmpdl_bgradlex(int n,DL d1,DL d2);
                   1939: int cmpdl_brevgradlex(int n,DL d1,DL d2);
                   1940: int cmpdl_brevrev(int n,DL d1,DL d2);
                   1941: int cmpdl_bgradrev(int n,DL d1,DL d2);
                   1942: int cmpdl_blexrev(int n,DL d1,DL d2);
                   1943: int cmpdl_elim(int n,DL d1,DL d2);
                   1944: int cmpdl_weyl_elim(int n,DL d1,DL d2);
                   1945: int cmpdl_homo_ww_drl(int n,DL d1,DL d2);
                   1946: int cmpdl_order_pair(int n,DL d1,DL d2);
                   1947: int cmpdl_matrix(int n,DL d1,DL d2);
                   1948: void ptomd(VL vl,int mod,VL dvl,P p,DP *pr);
                   1949: void mptomd(VL vl,int mod,VL dvl,P p,DP *pr);
                   1950: void mdtop(VL vl,int mod,VL dvl,DP p,P *pr);
                   1951: void addmd(VL vl,int mod,DP p1,DP p2,DP *pr);
                   1952: void submd(VL vl,int mod,DP p1,DP p2,DP *pr);
                   1953: void chsgnmd(int mod,DP p,DP *pr);
                   1954: void mulmd(VL vl,int mod,DP p1,DP p2,DP *pr);
                   1955: void comm_mulmd(VL vl,int mod,DP p1,DP p2,DP *pr);
                   1956: void weyl_mulmd(VL vl,int mod,DP p1,DP p2,DP *pr);
                   1957: void mulmdm(VL vl,int mod,DP p,MP m0,DP *pr);
                   1958: void weyl_mulmdm(VL vl,int mod,DP p,MP m0,DP *pr);
                   1959: void weyl_mulmmm(VL vl,int mod,MP m0,MP m1,int n,DP *pr);
                   1960: void mulmdc(VL vl,int mod,DP p,P c,DP *pr);
                   1961: void divsmdc(VL vl,int mod,DP p,P c,DP *pr);
                   1962: void _dtop_mod(VL vl,VL dvl,DP p,P *pr);
                   1963: void _dp_mod(DP p,int mod,NODE subst,DP *rp);
                   1964: void _dp_monic(DP p,int mod,DP *rp);
                   1965: void _printdp(DP d);
                   1966: void addmd_destructive(int mod,DP p1,DP p2,DP *pr);
                   1967: void mulmd_dup(int mod,DP p1,DP p2,DP *pr);
                   1968: void comm_mulmd_dup(int mod,DP p1,DP p2,DP *pr);
                   1969: void weyl_mulmd_dup(int mod,DP p1,DP p2,DP *pr);
                   1970: void mulmdm_dup(int mod,DP p,MP m0,DP *pr);
                   1971: void weyl_mulmdm_dup(int mod,MP m0,DP p,DP *pr);
                   1972: void weyl_mulmmm_dup(int mod,MP m0,MP m1,int n,struct cdlm *rtab,int rtablen);
                   1973: void comm_mulmd_tab_destructive(int mod,int nv,struct cdlm *t,int n,struct cdlm *t1,int n1);
                   1974: void adddl_dup(int n,DL d1,DL d2,DL *dr);
                   1975: void monicup(UP a,UP *b);
                   1976: void simpup(UP a,UP *b);
                   1977: void simpnum(Num a,Num *b);
                   1978: void uremp(P p1,P p2,P *rp);
                   1979: void ugcdp(P p1,P p2,P *rp);
                   1980: void reversep(P p1,Q d,P *rp);
                   1981: void invmodp(P p1,Q d,P *rp);
                   1982: void addup(UP n1,UP n2,UP *nr);
                   1983: void subup(UP n1,UP n2,UP *nr);
                   1984: void chsgnup(UP n1,UP *nr);
                   1985: void hybrid_mulup(int ff,UP n1,UP n2,UP *nr);
                   1986: void hybrid_squareup(int ff,UP n1,UP *nr);
                   1987: void hybrid_tmulup(int ff,UP n1,UP n2,int d,UP *nr);
                   1988: void mulup(UP n1,UP n2,UP *nr);
                   1989: void mulcup(Num c,UP n1,UP *nr);
                   1990: void tmulup(UP n1,UP n2,int d,UP *nr);
                   1991: void squareup(UP n1,UP *nr);
                   1992: void remup(UP n1,UP n2,UP *nr);
                   1993: void remup_destructive(UP n1,UP n2);
                   1994: void qrup(UP n1,UP n2,UP *nq,UP *nr);
                   1995: void qrup_destructive(UP n1,UP n2);
                   1996: void gcdup(UP n1,UP n2,UP *nr);
                   1997: void extended_gcdup(UP a,UP m,UP *r);
                   1998: void reverseup(UP n1,int d,UP *nr);
                   1999: void invmodup(UP n1,int d,UP *nr);
                   2000: void pwrup(UP n,Q e,UP *nr);
                   2001: int compup(UP n1,UP n2);
                   2002: void kmulp(VL vl,P n1,P n2,P *nr);
                   2003: void ksquarep(VL vl,P n1,P *nr);
                   2004: void kmulup(UP n1,UP n2,UP *nr);
                   2005: void ksquareup(UP n1,UP *nr);
                   2006: void copyup(UP n1,UP n2);
                   2007: void c_copyup(UP n,int len,pointer *p);
                   2008: void kmulupmain(UP n1,UP n2,UP *nr);
                   2009: void ksquareupmain(UP n1,UP *nr);
                   2010: void rembymulup(UP n1,UP n2,UP *nr);
                   2011: void hybrid_rembymulup_special(int ff,UP n1,UP n2,UP inv2,UP *nr);
                   2012: void rembymulup_special(UP n1,UP n2,UP inv2,UP *nr);
                   2013: void tkmulup(UP n1,UP n2,int d,UP *nr);
                   2014: void shiftup(UP n,int d,UP *nr);
                   2015: void fft_rembymulup_special(UP n1,UP n2,UP inv2,UP *nr);
                   2016: void set_degreeup(UP n,int d);
                   2017: void decompup(UP n,int d,UP *n0,UP *n1);
                   2018: void truncup(UP n1,int d,UP *nr);
                   2019: int int_bits(int t);
                   2020: int maxblenup(UP n);
                   2021: void uptofmarray(int mod,UP n,ModNum *f);
                   2022: void fmarraytoup(ModNum *f,int d,UP *nr);
                   2023: void uiarraytoup(unsigned int **f,int n,int d,UP *nr);
                   2024: void adj_coefup(UP n,N m,N m2,UP *nr);
                   2025: void remcup(UP n,N mod,UP *nr);
                   2026: void fft_mulup(UP n1,UP n2,UP *nr);
                   2027: void trunc_fft_mulup(UP n1,UP n2,int dbd,UP *nr);
                   2028: void fft_squareup(UP n1,UP *nr);
                   2029: void fft_mulup_main(UP n1,UP n2,int dbd,UP *nr);
                   2030: void crup(ModNum **f,int d,int *mod,int index,N m,UP *r);
                   2031: void fft_mulup_specialmod_main(UP n1,UP n2,int dbd,int *modind,int nmod,UP *nr);
                   2032: void divn(N n1,N n2,N *nq,N *nr);
                   2033: void divsn(N n1,N n2,N *nq);
                   2034: void remn(N n1,N n2,N *nr);
                   2035: void remn_special(N a,N d,int bits,unsigned int lower,N *b);
                   2036: void mulin(N n,unsigned int d,unsigned int *p);
                   2037: unsigned int divin(N n,unsigned int dvr,N *q);
                   2038: void bprintn(N n);
                   2039: void bxprintn(N n);
                   2040: void muln(N n1,N n2,N *nr);
                   2041: void _muln(N n1,N n2,N nr);
                   2042: void muln_1(unsigned int *p,int s,unsigned int d,unsigned int *r);
                   2043: void divnmain(int d1,int d2,unsigned int *m1,unsigned int *m2,unsigned int *q);
                   2044: void divnmain_special(int d1,int d2,unsigned int *m1,unsigned int *m2,unsigned int *q);
                   2045: unsigned int divn_1(unsigned int *p,int s,unsigned int d,unsigned int *r);
                   2046: void addn(N n1,N n2,N *nr);
                   2047: int subn(N n1,N n2,N *nr);
                   2048: void _addn(N n1,N n2,N nr);
                   2049: int _subn(N n1,N n2,N nr);
                   2050: void addarray_to(unsigned int *a1,int n1,unsigned int *a2,int n2);
                   2051: void pwrn(N n,int e,N *nr);
                   2052: void gcdn(N n1,N n2,N *nr);
                   2053: void gcdEuclidn(N n1,N n2,N *nr);
                   2054: int cmpn(N n1,N n2);
                   2055: void bshiftn(N n,int b,N *r);
                   2056: void shiftn(N n,int w,N *r);
                   2057: void randomn(int bits,N *r);
                   2058: void freen(N n);
                   2059: int n_bits(N n);
                   2060: void fft_mulup_lm(UP n1,UP n2,UP *nr);
                   2061: void fft_squareup_lm(UP n1,UP *nr);
                   2062: void trunc_fft_mulup_lm(UP n1,UP n2,int dbd,UP *nr);
                   2063: void crup_lm(ModNum **f,int d,int *mod,int index,N m,N lm_mod,UP *r);
                   2064: void fft_rembymulup_special_lm(UP n1,UP n2,UP inv2,UP *nr);
                   2065: void uptolmup(UP n,UP *nr);
                   2066: void save_up(UP obj,char *name);
                   2067: void hybrid_powermodup(UP f,UP *xp);
                   2068: void powermodup(UP f,UP *xp);
                   2069: void hybrid_generic_powermodup(UP g,UP f,Q d,UP *xp);
                   2070: void generic_powermodup(UP g,UP f,Q d,UP *xp);
                   2071: void hybrid_powertabup(UP f,UP xp,UP *tab);
                   2072: void powertabup(UP f,UP xp,UP *tab);
                   2073: void squarep_gf2n(VL vl,P n1,P *nr);
                   2074: void squareup_gf2n(UP n1,UP *nr);
                   2075: void powermodup_gf2n(UP f,UP *xp);
                   2076: void generic_powermodup_gf2n(UP g,UP f,Q d,UP *xp);
                   2077: void tracemodup_gf2n(UP g,UP f,Q d,UP *xp);
                   2078: void tracemodup_gf2n_slow(UP g,UP f,Q d,UP *xp);
                   2079: void tracemodup_gf2n_tab(UP g,UP f,Q d,UP *xp);
                   2080: void square_rem_tab_up_gf2n(UP f,UP *tab,UP *rp);
                   2081: void powertabup_gf2n(UP f,UP xp,UP *tab);
                   2082: void find_root_gf2n(UP f,GF2N *r);
                   2083: void ptoup2(P n,UP2 *nr);
                   2084: void ptoup2_sparse(P n,UP2 *nr);
                   2085: void up2top(UP2 n,P *nr);
                   2086: void up2tovect(UP2 n,VECT *nr);
                   2087: void up2ton(UP2 p,Q *n);
                   2088: void ntoup2(Q n,UP2 *p);
                   2089: void gen_simpup2(UP2 p,GEN_UP2 m,UP2 *r);
                   2090: void gen_simpup2_destructive(UP2 p,GEN_UP2 m);
                   2091: void gen_invup2(UP2 p,GEN_UP2 m,UP2 *r);
                   2092: void gen_pwrmodup2(UP2 a,Q b,GEN_UP2 m,UP2 *c);
                   2093: void simpup2(UP2 p,UP2 m,UP2 *r);
                   2094: int degup2(UP2 a);
                   2095: int degup2_sparse(UP2 a);
                   2096: int degup2_1(unsigned int a);
                   2097: void addup2(UP2 a,UP2 b,UP2 *c);
                   2098: void subup2(UP2 a,UP2 b,UP2 *c);
                   2099: void _mulup2_1(UP2 a,unsigned int b,UP2 c);
                   2100: void _mulup2_h(UP2 a,unsigned int b,UP2 c);
                   2101: void mulup2(UP2 a,UP2 b,UP2 *c);
                   2102: void _kmulup2_(unsigned int *a,unsigned int *b,int w,unsigned int *c);
                   2103: void _mulup2_nn(unsigned int *a,unsigned int *b,int w,unsigned int *c);
                   2104: void _mulup2(UP2 a,UP2 b,UP2 c);
                   2105: void _mulup2_(_UP2 a,_UP2 b,_UP2 c);
                   2106: void squareup2(UP2 n,UP2 *nr);
                   2107: void _squareup2(UP2 n,UP2 nr);
                   2108: void _adjup2(UP2 n);
                   2109: void _adjup2_(_UP2 n);
                   2110: void _addup2(UP2 a,UP2 b,UP2 c);
                   2111: void _addup2_destructive(UP2 a,UP2 b);
                   2112: void _addup2_(_UP2 a,_UP2 b,_UP2 c);
                   2113: void _addtoup2_(_UP2 a,_UP2 b);
                   2114: unsigned int mulup2_bb(unsigned int a,unsigned int b);
                   2115: void init_up2_tab();
                   2116: void divup2_1(unsigned int a1,unsigned int a2,int e1,int e2,unsigned int *qp,unsigned int *rp);
                   2117: void qrup2(UP2 a,UP2 b,UP2 *q,UP2 *r);
                   2118: void _qrup2(UP2 a,UP2 b,UP2 q,UP2 r);
                   2119: void remup2(UP2 a,UP2 b,UP2 *c);
                   2120: void _remup2(UP2 a,UP2 b,UP2 c);
                   2121: void remup2_sparse(UP2 a,UP2 b,UP2 *c);
                   2122: void remup2_sparse_destructive(UP2 a,UP2 b);
                   2123: void remup2_type1_destructive(UP2 a,int d);
                   2124: void remup2_3_destructive(UP2 a,UP2 b);
                   2125: void remup2_5_destructive(UP2 a,UP2 b);
                   2126: void _invup2_1(unsigned int f1,unsigned int f2,unsigned int *a1,unsigned int *b1);
                   2127: void _gcdup2_1(unsigned int f1,unsigned int f2,unsigned int *gcd);
                   2128: void up2_init_eg();
                   2129: void up2_show_eg();
                   2130: void invup2(UP2 a,UP2 m,UP2 *inv);
                   2131: void gcdup2(UP2 a,UP2 m,UP2 *gcd);
                   2132: void chsgnup2(UP2 a,UP2 *c);
                   2133: void pwrmodup2(UP2 a,Q b,UP2 m,UP2 *c);
                   2134: void pwrmodup2_sparse(UP2 a,Q b,UP2 m,UP2 *c);
                   2135: int compup2(UP2 n1,UP2 n2);
                   2136: void _copyup2(UP2 n,UP2 r);
                   2137: void _bshiftup2(UP2 n,int b,UP2 r);
                   2138: void _bshiftup2_destructive(UP2 n,int b);
                   2139: void diffup2(UP2 f,UP2 *r);
                   2140: int sqfrcheckup2(UP2 f);
                   2141: int irredcheckup2(UP2 f);
                   2142: int irredcheck_dddup2(UP2 f);
                   2143: void _copy_up2bits(UP2 p,unsigned int **mat,int pos);
                   2144: int compute_multiplication_matrix(P p0,GF2MAT *mp);
                   2145: void compute_change_of_basis_matrix(P p0,P p1,int to,GF2MAT *m01,GF2MAT *m10);
                   2146: void compute_change_of_basis_matrix_with_root(P p0,P p1,int to,GF2N root,GF2MAT *m01,GF2MAT *m10);
                   2147: int compute_representation_conversion_matrix(P p0,GF2MAT *np,GF2MAT *pn);
                   2148: void mul_nb(GF2MAT mat,unsigned int *a,unsigned int *b,unsigned int *c);
                   2149: void leftshift(unsigned int *a,int n);
                   2150: void mat_to_gf2mat(MAT a,unsigned int ***b);
                   2151: void gf2mat_to_mat(unsigned int **a,int n,MAT *b);
                   2152: void mulgf2mat(int n,unsigned int **a,unsigned int **b,unsigned int **c);
                   2153: void mulgf2vectmat(int n,unsigned int *a,unsigned int **b,unsigned int *c);
                   2154: int mulgf2vectvect(int n,unsigned int *a,unsigned int *b);
                   2155: int invgf2mat(int n,unsigned int **a,unsigned int **b);
                   2156: void _mulup2_22(unsigned int *a1,unsigned int *a2,unsigned int *ar);
                   2157: void _mulup2_33(unsigned int *a1,unsigned int *a2,unsigned int *ar);
                   2158: void _mulup2_44(unsigned int *a1,unsigned int *a2,unsigned int *ar);
                   2159: void _mulup2_55(unsigned int *a1,unsigned int *a2,unsigned int *ar);
                   2160: void _mulup2_66(unsigned int *a1,unsigned int *a2,unsigned int *ar);
                   2161: void type1_bin_invup2(UP2 a,int n,UP2 *inv);
                   2162: UP2 *compute_tab_gf2n(UP2 f);
                   2163: UP compute_trace_gf2n(UP2 *tab,GF2N c,int n);
                   2164: void up2toup(UP2 f,UP *r);
                   2165: void find_root_up2(UP2 f,GF2N *r);
                   2166: void addq(Q n1,Q n2,Q *nr);
                   2167: void subq(Q n1,Q n2,Q *nr);
                   2168: void mulq(Q n1,Q n2,Q *nr);
                   2169: void divq(Q n1,Q n2,Q *nq);
                   2170: void divsq(Q n1,Q n2,Q *nq);
                   2171: void invq(Q n,Q *nr);
                   2172: void chsgnq(Q n,Q *nr);
                   2173: void pwrq(Q n1,Q n,Q *nr);
                   2174: int cmpq(Q q1,Q q2);
                   2175: void remq(Q n,Q m,Q *nr);
                   2176: void mkbc(int n,Q *t);
                   2177: void mkwc(int k,int l,Q *t);
                   2178: void mkwcm(int k,int l,int m,int *t);
                   2179: void factorial(int n,Q *r);
                   2180: void invl(Q a,Q mod,Q *ar);
                   2181: void kmuln(N n1,N n2,N *nr);
                   2182: void extractn(N n,int index,int len,N *nr);
                   2183: void copyn(N n,int len,int *p);
                   2184: void dupn(N n,N p);
                   2185: void kmulnmain(N n1,N n2,N *nr);
                   2186: void plisttop(P *f,V v,int n,P *gp);
                   2187: int divtp(VL vl,P p1,P p2,P *q);
                   2188: int divtdcp(VL vl,P p1,P p2,P *q);
                   2189: int divtpz(VL vl,P p1,P p2,P *q);
                   2190: int divtdcpz(VL vl,P p1,P p2,P *q);
                   2191: void udivpz(P f1,P f2,P *fqp,P *frp);
                   2192: void udivpwm(Q mod,P p1,P p2,P *q,P *r);
                   2193: void udivpzwm(Q mod,P f1,P f2,P *fqp,P *frp);
                   2194: 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);
                   2195: 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);
                   2196: 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);
                   2197: void henzq1(P g,P h,Q bound,P *gcp,P *hcp,Q *qp);
                   2198: void addm2p(VL vl,Q mod,Q mod2,P n1,P n2,P *nr);
                   2199: void subm2p(VL vl,Q mod,Q mod2,P n1,P n2,P *nr);
                   2200: void mulm2p(VL vl,Q mod,Q mod2,P n1,P n2,P *nr);
                   2201: void cmp(Q mod,P p,P *pr);
                   2202: void cm2p(Q mod,Q m,P p,P *pr);
                   2203: void addm2q(Q mod,Q mod2,Q n1,Q n2,Q *nr);
                   2204: void subm2q(Q mod,Q mod2,Q n1,Q n2,Q *nr);
                   2205: void mulm2q(Q mod,Q mod2,Q n1,Q n2,Q *nr);
                   2206: void rem2q(Q n,Q m,Q m2,Q *nr);
                   2207: void exthpc_generic(VL vl,P p,int d,V v,P *pr);
                   2208: void exthp(VL vl,P p,int d,P *pr);
                   2209: void exthpc(VL vl,V v,P p,int d,P *pr);
                   2210: void cbound(VL vl,P p,Q *b);
                   2211: int geldb(VL vl,P p);
                   2212: int getdeg(V v,P p);
                   2213: void cmax(P p,Q *b);
                   2214: int nextbin(VN vn,int n);
                   2215: void mulsgn(VN vn,VN vnt,int n,VN vn1);
                   2216: void next(VN vn);
                   2217: void clctv(VL vl,P p,VL *nvlp);
                   2218: void markv(VN vn,int n,P p);
                   2219: void vntovl(VN vn,int n,VL *vlp);
                   2220: int dbound(V v,P f);
                   2221: int homdeg(P f);
                   2222: int minhomdeg(P f);
                   2223: void adjc(VL vl,P f,P a,P lc0,Q q,P *fr,P *ar);
                   2224: void affinemain(VL vl,P p,V v0,int n,P *pl,P *pr);
                   2225: void restore(VL vl,P f,VN vn,P *fr);
                   2226: void mergev(VL vl,VL vl1,VL vl2,VL *nvlp);
                   2227: void substvp(VL vl,P f,VN vn,P *g);
                   2228: void affine(VL vl,P f,VN vn,P *fr);
                   2229: void addnum(VL vl,Num a,Num b,Num *c);
                   2230: void subnum(VL vl,Num a,Num b,Num *c);
                   2231: void mulnum(VL vl,Num a,Num b,Num *c);
                   2232: void divnum(VL vl,Num a,Num b,Num *c);
                   2233: void pwrnum(VL vl,Num a,Num b,Num *c);
                   2234: void chsgnnum(Num a,Num *c);
                   2235: int compnum(VL vl,Num a,Num b);
                   2236: void one_ff(Num *c);
                   2237: int negative_number(Num c);
                   2238: void simp_ff(Obj p,Obj *rp);
                   2239: void field_order_ff(N *order);
                   2240: int fft_available(int d1,int n1,int d2,int n2);
                   2241: void get_fft_prime(int index,int *p,int *d);
                   2242: void nglob_init();
                   2243: void get_eg(struct oEGT *p);
                   2244: void init_eg(struct oEGT *eg);
                   2245: void add_eg(struct oEGT *base,struct oEGT *start,struct oEGT *end);
                   2246: void print_eg(char *item,struct oEGT *eg);
                   2247: void print_split_eg(struct oEGT *start,struct oEGT *end);
                   2248: void print_split_e(struct oEGT *start,struct oEGT *end);
                   2249: void suspend_timer() ;
                   2250: void resume_timer() ;
                   2251: void reset_engine() ;
                   2252: unsigned int get_asir_version() ;
                   2253: char *get_asir_distribution();
                   2254: void create_error(ERR *err,unsigned int serial,char *msg);
                   2255: void init_lprime();
                   2256: int get_lprime(int index);
                   2257: void create_new_lprimes(int index);
                   2258: void reorderp(VL nvl,VL ovl,P p,P *pr);
                   2259: void substp(VL vl,P p,V v0,P p0,P *pr);
                   2260: void detp(VL vl,P **rmat,int n,P *dp);
                   2261: void invmatp(VL vl,P **rmat,int n,P ***imatp,P *dnp);
                   2262: void reordvar(VL vl,V v,VL *nvlp);
                   2263: void gcdprsp(VL vl,P p1,P p2,P *pr);
                   2264: void gcdcp(VL vl,P p,P *pr);
                   2265: void sprs(VL vl,V v,P p1,P p2,P *pr);
                   2266: void resultp(VL vl,V v,P p1,P p2,P *pr);
                   2267: void srch2(VL vl,V v,P p1,P p2,P *pr);
                   2268: void srcr(VL vl,V v,P p1,P p2,P *pr);
                   2269: void res_ch_det(VL vl,V v,P p1,P p2,P *pr);
                   2270: void res_detmp(VL vl,int mod,V v,P p1,P p2,P *dp);
                   2271: void premp(VL vl,P p1,P p2,P *pr);
                   2272: void ptozp0(P p,P *pr);
                   2273: void mindegp(VL vl,P p,VL *mvlp,P *pr);
                   2274: void maxdegp(VL vl,P p,VL *mvlp,P *pr);
                   2275: void min_common_vars_in_coefp(VL vl,P p,VL *mvlp,P *pr);
                   2276: void minlcdegp(VL vl,P p,VL *mvlp,P *pr);
                   2277: void sort_by_deg(int n,P *p,P *pr);
                   2278: void sort_by_deg_rev(int n,P *p,P *pr);
                   2279: void getmindeg(V v,P p,Q *dp);
                   2280: void minchdegp(VL vl,P p,VL *mvlp,P *pr);
                   2281: int getchomdeg(V v,P p);
                   2282: int getlchomdeg(V v,P p,int *d);
                   2283: int nmonop(P p);
                   2284: int qpcheck(Obj p);
                   2285: int uzpcheck(Obj p);
                   2286: int p_mag(P p);
                   2287: int maxblenp(P p);
                   2288: void berle(int index,int count,P f,ML *listp);
                   2289: int berlecnt(int mod,UM f);
                   2290: int berlecntmain(int mod,int n,int m,int **c);
                   2291: UM *berlemain(int mod,UM f,UM *fp);
                   2292: void hensel(int index,int count,P f,ML *listp);
                   2293: void hensel2(int index,int count,P f,ML *listp);
                   2294: void henmain2(LUM f,UM g0,UM h0,UM a0,UM b0,int m,int bound,LUM *gp);
                   2295: void clearlum(int n,int bound,LUM f);
                   2296: void addtolum(int m,int bound,LUM f,LUM g);
                   2297: void hsq(int index,int count,P f,int *nindex,DCP *dcp);
                   2298: void gcdgen(P f,ML blist,ML *clistp);
                   2299: void henprep2(int mod,int q,int k,UM f,UM g,UM h,UM qg,UM qh,UM qa,UM qb);
                   2300: void henprep(P f,ML blist,ML clist,ML *bqlistp,ML *cqlistp);
                   2301: void henmain(LUM f,ML bqlist,ML cqlist,ML *listp);
                   2302: int mignotte(int q,P f);
                   2303: int mig(int q,int d,P f);
                   2304: void sqad(unsigned int man,int exp);
                   2305: void ptolum(int q,int bound,P f,LUM fl);
                   2306: void modfctrp(P p,int mod,int flag,DCP *dcp);
                   2307: void gensqfrum(int mod,UM p,struct oDUM *dc);
                   2308: void ddd(int mod,UM f,UM *r);
                   2309: void canzas(int mod,UM f,int d,UM *base,UM *r);
                   2310: void randum(int mod,int d,UM p);
                   2311: void pwrmodum(int mod,UM p,int e,UM f,UM pr);
                   2312: void spwrum(int mod,UM m,UM *base,UM f,N e,UM r);
                   2313: void spwrum0(int mod,UM m,UM f,N e,UM r);
                   2314: void mult_mod_tab(UM p,int mod,UM *tab,UM r,int d);
                   2315: void make_qmat(UM p,int mod,UM *tab,int ***mp);
                   2316: void null_mod(int **mat,int mod,int n,int *ind);
                   2317: void null_to_sol(int **mat,int *ind,int mod,int n,UM *r);
                   2318: void newddd(int mod,UM f,UM *r);
                   2319: int nfctr_mod(UM f,int mod);
                   2320: int irred_check(UM f,int mod);
                   2321: int berlekamp(UM p,int mod,int df,UM *tab,UM *r);
                   2322: void minipoly_mod(int mod,UM f,UM p,UM mp);
                   2323: void lnf_mod(int mod,int n,UM p0,UM p1,struct p_pair *list,UM np0,UM np1);
                   2324: void showum(UM p);
                   2325: void showumat(int **mat,int n);
                   2326: int find_root(int mod,UM p,int *root);
                   2327: void fctrp(VL vl,P f,DCP *dcp);
                   2328: void fctr_wrt_v_p(VL vl,P f,V v,DCP *dcp);
                   2329: void homfctr(VL vl,P g,DCP *dcp);
                   2330: void mfctr(VL vl,P f,DCP *dcp);
                   2331: void mfctr_wrt_v(VL vl,P f,V v,DCP *dcp);
                   2332: void adjsgn(P p,DCP dc);
                   2333: int headsgn(P p);
                   2334: void fctrwithmvp(VL vl,P f,V v,DCP *dcp);
                   2335: void mfctrwithmv(VL vl,P f,V v,DCP *dcp);
                   2336: void ufctr(P f,int hint,DCP *dcp);
                   2337: void mfctrmain(VL vl,P p,DCP *dcp);
                   2338: void ufctrmain(P p,int hint,DCP *dcp);
                   2339: void cycm(V v,int n,DCP *dcp);
                   2340: void cycp(V v,int n,DCP *dcp);
                   2341: void calcphi(V v,int n,struct oMF *mfp);
                   2342: void mkssum(V v,int e,int s,int sgn,P *r);
                   2343: int iscycp(P f);
                   2344: int iscycm(P f);
                   2345: void sortfs(DCP *dcp);
                   2346: void sortfsrev(DCP *dcp);
                   2347: void nthrootchk(P f,struct oDUM *dc,ML fp,DCP *dcp);
                   2348: void sqfrp(VL vl,P f,DCP *dcp);
                   2349: void msqfr(VL vl,P f,DCP *dcp);
                   2350: void usqp(P f,DCP *dcp);
                   2351: void msqfrmain(VL vl,P p,DCP *dcp);
                   2352: void msqfrmainmain(VL vl,P p,VN vn,P p0,DCP dc0,DCP *dcp,P *pp);
                   2353: void mfctrhen2(VL vl,VN vn,P f,P f0,P g0,P h0,P lcg,P lch,P *gp);
                   2354: int sqfrchk(P p);
                   2355: int cycchk(P p);
                   2356: int zerovpchk(VL vl,P p,VN vn);
                   2357: int valideval(VL vl,DCP dc,VN vn);
                   2358: void estimatelc(VL vl,Q c,DCP dc,VN vn,P *lcp);
                   2359: void monomialfctr(VL vl,P p,P *pr,DCP *dcp);
                   2360: void afctr(VL vl,P p0,P p,DCP *dcp);
                   2361: void afctrmain(VL vl,P p0,P p,int init,DCP *dcp);
                   2362: int divtmp(VL vl,int mod,P p1,P p2,P *q);
                   2363: int divtdcmp(VL vl,int mod,P p1,P p2,P *q);
                   2364: void GC_gcollect();
1.1       noro     2365:
                   2366: #if 0 && !defined(VISUAL)
                   2367: void bzero(const void *,int);
                   2368: void bcopy(const void *,void *,int);
                   2369: char *index(char *,int);
                   2370: #endif

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