[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.32

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.32    ! noro       48:  * $OpenXM: OpenXM_contrib2/asir2000/include/ca.h,v 1.31 2001/12/21 08:23:12 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:
1.32    ! noro      569: #if !defined(__CYGWIN__) && (defined(__GNUC__) || defined(vax) || defined(apollo) || defined(alloca) || defined(VISUAL))
1.1       noro      570: #define ALLOCA(d) alloca(d)
                    571: #else
                    572: #define ALLOCA(d) MALLOC(d)
1.32    ! noro      573: #endif
        !           574:
        !           575: /* for setjmp/longjmp compatibility */
        !           576: #if defined(__CYGWIN__)
        !           577: #define JMP_BUF sigjmp_buf
        !           578: #define SETJMP(x) sigsetjmp(x,~0)
        !           579: #define LONGJMP(x,y) siglongjmp(x,y)
        !           580: #else
        !           581: #define JMP_BUF jmp_buf
        !           582: #define SETJMP(x) setjmp(x)
        !           583: #define LONGJMP(x,y) longjmp(x,y)
1.1       noro      584: #endif
                    585:
                    586: #define TRUESIZE(type,n,atype) (sizeof(struct type)+MAX((n),0)*sizeof(atype))
                    587: #define NALLOC(d) ((N)MALLOC_ATOMIC(TRUESIZE(oN,(d)-1,int)))
                    588: #define UMALLOC(d) ((UM)MALLOC(TRUESIZE(oUM,d,int)))
                    589: #define UPALLOC(d) ((UP)MALLOC(TRUESIZE(oUP,(d),Num)))
                    590: #define C_UMALLOC(d) ((UM)MALLOC(TRUESIZE(oUM,d,int)))
                    591: #define MLALLOC(d) ((ML)MALLOC(TRUESIZE(oML,d,pointer)))
                    592:
                    593: #define W_ALLOC(d) ((int *)ALLOCA(((d)+1)*sizeof(int)))
                    594: #define W_CALLOC(n,type,p) \
                    595: ((p)=(type *)ALLOCA(((n)+1)*sizeof(type)),\
                    596: bzero((char *)(p),(int)(((n)+1)*sizeof(type))))
                    597: #define W_UMALLOC(d) ((UM)ALLOCA(TRUESIZE(oUM,d,int)))
                    598: #define W_UPALLOC(d) ((UP)ALLOCA(TRUESIZE(oUP,(d),Num)))
                    599: #define W_MLALLOC(d) ((ML)ALLOCA(TRUESIZE(oML,d,pointer)))
                    600: #define W_LUMALLOC(n,bound,p)\
                    601: {\
                    602:        LUM ___q___;\
                    603:        int ___i___,**___c___;\
                    604:        (___q___) = (LUM)ALLOCA(TRUESIZE(oLUM,(n),int *));\
                    605:        DEG(___q___) = n;\
                    606:        for ( ___i___ = 0, ___c___ = (int **)COEF(___q___); ___i___ <= n; ___i___++ ) {\
                    607:                ___c___[___i___] = (int *)ALLOCA(((bound)+1)*sizeof(int));\
                    608:                bzero((char *)___c___[___i___],((bound)+1)*sizeof(int));\
                    609:        }\
                    610:        (p) = ___q___;\
                    611: }
                    612:
1.18      noro      613: #define W_BMALLOC(dx,dy,p)\
1.16      noro      614: {\
                    615:        BM ___q___;\
                    616:        int ___i___;\
                    617:        UM *___c___;\
1.18      noro      618:        (___q___) = (BM)ALLOCA(TRUESIZE(oBM,(dy),UM));\
                    619:        DEG(___q___) = dy;\
1.16      noro      620:        ___c___ = (UM *)COEF(___q___);\
1.18      noro      621:        for ( ___i___ = 0; ___i___ <= dy; ___i___++ ) {\
                    622:                ___c___[___i___] = W_UMALLOC(dx);\
                    623:                clearum(___c___[___i___],dx);\
1.16      noro      624:        }\
                    625:        (p) = ___q___;\
                    626: }
                    627:
1.1       noro      628: #define NEWUP2(q,w)\
                    629: ((q)=(UP2)MALLOC_ATOMIC(TRUESIZE(oUP2,(w)-1,unsigned int)),\
                    630: bzero((char *)(q)->b,(w)*sizeof(unsigned int)))
                    631: #define W_NEWUP2(q,w)\
                    632: ((q)=(UP2)ALLOCA(TRUESIZE(oUP2,(w)-1,unsigned int)),\
                    633: bzero((char *)(q)->b,(w)*sizeof(unsigned int)))
                    634: #define W_NEW_UP2(q,w)\
                    635: ((q).b=(unsigned int *)ALLOCA((w)*sizeof(unsigned int)))
                    636:
                    637: /* cell allocators */
                    638: #define NEWQ(q) ((q)=(Q)MALLOC(sizeof(struct oQ)),OID(q)=O_N,NID(q)=N_Q)
                    639: #define NEWMQ(q) ((q)=(MQ)MALLOC_ATOMIC(sizeof(struct oMQ)),OID(q)=O_N,NID(q)=N_M)
1.12      noro      640: #define NEWGFS(q) ((q)=(GFS)MALLOC_ATOMIC(sizeof(struct oGFS)),OID(q)=O_N,NID(q)=N_GFS)
1.21      noro      641: #define NEWGFSN(q) ((q)=(GFSN)MALLOC(sizeof(struct oGFSN)),OID(q)=O_N,NID(q)=N_GFSN)
1.1       noro      642: #define NEWP(p) ((p)=(P)MALLOC(sizeof(struct oP)),OID(p)=O_P)
                    643: #define NEWR(r) ((r)=(R)MALLOC(sizeof(struct oR)),OID(r)=O_R,(r)->reduced=0)
                    644: #define NEWLIST(l) ((l)=(LIST)MALLOC(sizeof(struct oLIST)),OID(l)=O_LIST)
                    645: #define NEWVECT(l) ((l)=(VECT)MALLOC(sizeof(struct oVECT)),OID(l)=O_VECT)
                    646: #define NEWSTR(l) ((l)=(STRING)MALLOC(sizeof(struct oSTRING)),OID(l)=O_STR)
                    647: #define NEWCOMP(c,n) ((c)=(COMP)MALLOC(sizeof(struct oCOMP)+((n)-1)*sizeof(Obj)),OID(c)=O_COMP)
                    648: #define NEWDP(d) ((d)=(DP)MALLOC(sizeof(struct oDP)),OID(d)=O_DP)
                    649: #define NEWUSINT(u) ((u)=(USINT)MALLOC_ATOMIC(sizeof(struct oUSINT)),OID(u)=O_USINT)
                    650: #define NEWERR(e) ((e)=(ERR)MALLOC(sizeof(struct oERR)),OID(e)=O_ERR)
                    651: #define NEWMATHCAP(e) ((e)=(MATHCAP)MALLOC(sizeof(struct oMATHCAP)),OID(e)=O_MATHCAP)
1.6       noro      652: #define NEWBYTEARRAY(e) ((e)=(BYTEARRAY)MALLOC(sizeof(struct oBYTEARRAY)),OID(e)=O_BYTEARRAY)
1.13      noro      653: #define NEWQUOTE(e) ((e)=(QUOTE)MALLOC(sizeof(struct oQUOTE)),OID(e)=O_QUOTE)
1.1       noro      654:
                    655: #define NEWNODE(a) ((a)=(NODE)MALLOC(sizeof(struct oNODE)))
                    656: #define NEWDC(dc) ((dc)=(DCP)MALLOC(sizeof(struct oDCP)))
                    657: #define NEWV(v) ((v)=(V)MALLOC(sizeof(struct oV)))
                    658: #define NEWVL(vl) ((vl)=(VL)MALLOC(sizeof(struct oVL)))
                    659: #define NEWMP(m) ((m)=(MP)MALLOC(sizeof(struct oMP)))
1.25      noro      660: #define NEWDLBUCKET(a) ((a)=(DLBUCKET)MALLOC(sizeof(struct oDLBUCKET)))
1.29      noro      661: #define NEWDPP(a) ((a)=(DP_pairs)MALLOC(sizeof(struct dp_pairs)))
1.1       noro      662:
                    663: #define NEWMAT(l) ((l)=(MAT)MALLOC(sizeof(struct oMAT)),OID(l)=O_MAT)
                    664: #define NEWGF2MAT(l) ((l)=(GF2MAT)MALLOC(sizeof(struct oGF2MAT)),OID(l)=O_GF2MAT)
                    665: #define NEWGFMMAT(l) ((l)=(GFMMAT)MALLOC(sizeof(struct oGF2MAT)),OID(l)=O_GFMMAT)
                    666: #define NEWReal(q) ((q)=(Real)MALLOC_ATOMIC(sizeof(struct oReal)),OID(q)=O_N,NID(q)=N_R)
                    667: #define NEWAlg(r) ((r)=(Alg)MALLOC(sizeof(struct oAlg)),OID(r)=O_N,NID(r)=N_A)
                    668: #define NEWBF(q,l) ((q)=(BF)MALLOC_ATOMIC(TRUESIZE(oBF,(l)-1,long)),OID(q)=O_N,NID(q)=N_B)
                    669: #define NEWC(r) ((r)=(C)MALLOC(sizeof(struct oC)),OID(r)=O_N,NID(r)=N_C)
                    670: #define NEWLM(r) ((r)=(LM)MALLOC(sizeof(struct oLM)),OID(r)=O_N,NID(r)=N_LM)
                    671: #define NEWGF2N(r) ((r)=(GF2N)MALLOC(sizeof(struct oGF2N)),OID(r)=O_N,NID(r)=N_GF2N)
                    672: #define NEWGFPN(r) ((r)=(GFPN)MALLOC(sizeof(struct oGFPN)),OID(r)=O_N,NID(r)=N_GFPN)
                    673: #define NEWDL(d,n) \
                    674: ((d)=(DL)MALLOC_ATOMIC(TRUESIZE(oDL,(n)-1,int)),bzero((char *)(d),TRUESIZE(oDL,(n)-1,int)))
1.9       noro      675: #define NEWDL_NOINIT(d,n) \
                    676: ((d)=(DL)MALLOC_ATOMIC(TRUESIZE(oDL,(n)-1,int)))
1.1       noro      677:
                    678: #define MKP(v,dc,p) \
                    679: (!DEG(dc)?((p)=COEF(dc)):(NEWP(p),VR(p)=(v),DC(p)=(dc),(p)))
                    680: #define MKV(v,p) \
                    681: (NEWP(p),VR(p)=(v),NEWDC(DC(p)),\
                    682: DEG(DC(p))=ONE,COEF(DC(p))=(P)ONE,NEXT(DC(p))=0)
                    683: #define MKRAT(n,d,r,p) \
                    684: (NEWR(p),NM(p)=(n),DN(p)=(d),(p)->reduced=(r))
                    685: #define MKMV(v,p) \
                    686: (NEWP(p),VR(p)=(v),NEWDC(DC(p)),\
                    687: DEG(DC(p))=ONE,COEF(DC(p))=(P)ONEM,NEXT(DC(p))=0)
                    688: #define MKNODE(a,b,c) \
                    689: (NEWNODE(a),(a)->body=(pointer)b,NEXT(a)=(NODE)(c))
                    690: #define MKLIST(a,b) (NEWLIST(a),(a)->body=(NODE)(b))
                    691: #define MKVECT(m,l) \
                    692: (NEWVECT(m),(m)->len=(l),(m)->body=(pointer *)CALLOC((l),sizeof(pointer)))
                    693: #define MKMAT(m,r,c) \
                    694: (NEWMAT(m),(m)->row=(r),(m)->col=(c),(m)->body=(pointer **)almat_pointer((r),(c)))
                    695: #define TOGF2MAT(r,c,b,m) (NEWGF2MAT(m),(m)->row=(r),(m)->col=(c),(m)->body=(b))
                    696: #define TOGFMMAT(r,c,b,m) (NEWGFMMAT(m),(m)->row=(r),(m)->col=(c),(m)->body=(b))
                    697: #define MKSTR(a,b) (NEWSTR(a),(a)->body=(char *)(b))
                    698: #define MKDP(n,m,d) (NEWDP(d),(d)->nv=(n),BDY(d)=(m))
                    699: #define MKLM(b,l) (!(b)?(l)=0:(NEWLM(l),(l)->body=(b),(l)))
                    700: #define MKGF2N(b,l) (!(b)?(l)=0:(NEWGF2N(l),(l)->body=(b),(l)))
                    701: #define MKGFPN(b,l) (!(b)?(l)=0:(NEWGFPN(l),(l)->body=(b),(l)))
                    702: #define MKUSINT(u,b) (NEWUSINT(u),(u)->body=(unsigned)(b))
                    703: #define MKERR(e,b) (NEWERR(e),(e)->body=(Obj)(b))
                    704: #define MKMATHCAP(e,b) (NEWMATHCAP(e),(e)->body=(LIST)(b))
1.6       noro      705: #define MKBYTEARRAY(m,l) \
                    706: (NEWBYTEARRAY(m),(m)->len=(l),(m)->body=(char *)MALLOC_ATOMIC((l)),bzero((m)->body,(l)))
1.13      noro      707: #define MKQUOTE(q,b) (NEWQUOTE(q),(q)->body=(pointer)(b))
1.1       noro      708:
                    709: #define NEXTDC(r,c) \
                    710: if(!(r)){NEWDC(r);(c)=(r);}else{NEWDC(NEXT(c));(c)=NEXT(c);}
                    711: #define NEXTNODE(r,c) \
                    712: if(!(r)){NEWNODE(r);(c)=(r);}else{NEWNODE(NEXT(c));(c)=NEXT(c);}
                    713: #define NEXTMP(r,c) \
                    714: if(!(r)){NEWMP(r);(c)=(r);}else{NEWMP(NEXT(c));(c)=NEXT(c);}
1.9       noro      715: #define NEXTMP2(r,c,s) \
                    716: if(!(r)){(c)=(r)=(s);}else{NEXT(c)=(s);(c)=(s);}
1.25      noro      717: #define NEXTDLBUCKET(r,c) \
                    718: if(!(r)){NEWDLBUCKET(r);(c)=(r);}else{NEWDLBUCKET(NEXT(c));(c)=NEXT(c);}
1.29      noro      719: #define NEXTVL(r,c) \
                    720: if(!(r)){NEWVL(r);(c)=(r);}else{NEWVL(NEXT(c));(c)=NEXT(c);}
                    721: #define NEXTDPP(r,c) \
                    722: if(!(r)){NEWDPP(r);(c)=(r);}else{NEWDPP(NEXT(c));(c)=NEXT(c);}
1.1       noro      723:
                    724: /* convertors */
                    725: #define NTOQ(n,s,q) \
                    726: (!(n)?((q)=0):(NEWQ(q),SGN(q)=(s),NM(q)=(n),DN(q)=0,(q)))
                    727: #define NDTOQ(n,d,s,q) \
                    728: ((!(d)||UNIN(d))?NTOQ(n,s,q):(NEWQ(q),SGN(q)=(s),NM(q)=(n),DN(q)=(d),(q)))
                    729: #define DUPQ(p,q) \
                    730: (NEWQ(q),SGN(q)=SGN(p),NM(q)=NM(p),DN(q)=DN(p))
                    731: #define STOQ(n,q) \
                    732: ((!(n))?((q)=(Q)NULL):(NEWQ(q),\
                    733: SGN(q)=((n)>0?1:-1),NM(q)=NALLOC(1),\
                    734: PL(NM(q))=1,BD(NM(q))[0]=ABS(n),DN(q)=0,(q)))
                    735: #define UTOMQ(a,b) \
                    736: ((a)?(NEWMQ(b),CONT(b)=(unsigned int)(a),(b)):((b)=0))
1.12      noro      737: #define MKGFS(a,b) \
                    738: ((NEWGFS(b),CONT(b)=(a),(b)))
1.21      noro      739: #define MKGFSN(a,b) \
                    740: ((DEG(a)>=0)?(NEWGFSN(b),BDY(b)=(a),(b)):((b)=0))
1.1       noro      741: #define STOMQ(a,b) \
                    742: ((a)?(NEWMQ(b),CONT(b)=(a),(b)):((b)=0))
                    743: #define UTON(u,n) \
                    744: ((!(u))?((n)=(N)NULL):((n)=NALLOC(1),PL(n)=1,BD(n)[0]=(unsigned int)(u),(n)))
                    745: #define UTOQ(n,q) \
                    746: ((!(n))?((q)=(Q)NULL):(NEWQ(q),\
                    747: SGN(q)=1,NM(q)=NALLOC(1),\
                    748: PL(NM(q))=1,BD(NM(q))[0]=(unsigned int)(n),DN(q)=0,(q)))
                    749: #define QTOS(q) (!(q)?0:SGN(q)*((int)BD(NM(q))[0]))
                    750: #define STON(i,n)\
                    751: (i?((n)=NALLOC(1),PL(n)=1,BD(n)[0]=(i),(n)):((n)=(N)0))
                    752: #define PTOR(a,b) \
                    753: (!(a)?((b)=0):(NEWR(b),NM(b)=(a),DN(b)=(P)ONE,(b)->reduced=1,(b)))
                    754: #define RTOS(a) (!(a)?0:QTOS((Q)NM((R)a)))
                    755: #define MKReal(a,b) (!(a)?((b)=0):(NEWReal(b),BDY(b)=(a),(b)))
                    756: #define MKAlg(b,r) \
                    757: (!(b)?((r)=0):NUM(b)?((r)=(Alg)(b)):(NEWAlg(r),BDY(r)=(Obj)(b),(r)))
                    758:
1.3       noro      759: #if PARI
                    760: #define ToReal(a) (!(a)?(double)0.0:REAL(a)?BDY((Real)a):RATN(a)?RatnToReal((Q)a):BIGFLOAT(a)?rtodbl(BDY((BF)a)):0)
                    761: #else
                    762: #define ToReal(a) (!(a)?(double)0.0:REAL(a)?BDY((Real)a):RATN(a)?RatnToReal((Q)a):0.0)
                    763: #endif
1.1       noro      764:
                    765: /* predicates */
                    766: #define NUM(p) (OID(p)==O_N)
                    767: #define RAT(p) (OID(p)==O_R)
                    768: #define RATN(a) (NID(a)==N_Q)
1.22      noro      769: #define INT(q) (!(q)||(NUM(q)&&RATN((Num)q)&&!DN((Q)q)))
1.1       noro      770: #define REAL(a) (NID(a)==N_R)
1.3       noro      771: #define BIGFLOAT(a) (NID(a)==N_B)
1.1       noro      772: #define SFF(a) (NID(a)==N_M)
                    773: #define UNIQ(q) ((q)&&NUM(q)&&RATN(q)&&(SGN((Q)q)==1)&&UNIN(NM((Q)q))&&(!DN((Q)q)))
                    774: #define UNIMQ(q) ((q)&&NUM(q)&&SFF(q)&&(CONT((MQ)q)==1))
                    775: #define MUNIQ(q) ((q)&&NUM(q)&&RATN(q)&&(SGN((Q)q)==-1)&&UNIN(NM((Q)q))&&(!DN((Q)q)))
                    776: #define MUNIMQ(q) ((q)&&NUM(q)&&SFF(q)&&(CONT((MQ)q)==-1))
                    777: #define UNIN(n) ((n)&&(PL(n)==1)&&(BD(n)[0]==1))
                    778: #define EVENN(n) ((!(n))||(!(BD(n)[0]%2)))
                    779:
1.8       noro      780: /* special macros for private memory management */
                    781:
                    782: #define NV(p) ((p)->nv)
                    783: #define C(p) ((p)->c)
1.28      noro      784: #if 0
1.8       noro      785: #define ITOS(p) (((unsigned int)(p))&0x7fffffff)
                    786: #define STOI(i) ((P)((unsigned int)(i)|0x80000000))
1.28      noro      787: #else
                    788: #define ITOS(p) (((unsigned int)(p)))
                    789: #define STOI(i) ((P)((unsigned int)(i)))
                    790: #endif
1.15      noro      791:
                    792: /* immediate GFS representation */
                    793:
                    794: #define IFTOF(p) ((int)(((unsigned int)(p))&0x7fffffff))
                    795: #define FTOIF(i) ((int)(((unsigned int)(i)|0x80000000)))
1.8       noro      796:
                    797: struct cdl {
                    798:        P c;
                    799:        DL d;
                    800: };
                    801:
                    802: struct cdlm {
                    803:        int c;
                    804:        DL d;
                    805: };
                    806:
                    807: extern MP _mp_free_list;
                    808: extern DP _dp_free_list;
                    809: extern DL _dl_free_list;
                    810: extern int current_dl_length;
                    811:
                    812: #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)
                    813: #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)))
                    814: #define _NEWMP(m) if(!_mp_free_list)_MP_alloc(); (m)=_mp_free_list; _mp_free_list = NEXT(_mp_free_list)
1.10      noro      815: #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      816:
                    817: #define _NEXTMP(r,c) \
                    818: if(!(r)){_NEWMP(r);(c)=(r);}else{_NEWMP(NEXT(c));(c)=NEXT(c);}
                    819:
                    820: #define _NEXTMP2(r,c,s) \
                    821: if(!(r)){(c)=(r)=(s);}else{NEXT(c)=(s);(c)=(s);}
                    822:
                    823: #define _FREEDL(m) *((DL *)m)=_dl_free_list; _dl_free_list=(m)
                    824: #define _FREEMP(m) NEXT(m)=_mp_free_list; _mp_free_list=(m)
                    825: #define _FREEDP(m) BDY(m)=(MP)_dp_free_list; _dp_free_list=(m)
1.1       noro      826:
                    827: /* externals */
                    828: #if 0
                    829: double NatToReal();
                    830: double RatnToReal();
                    831: #endif
                    832:
                    833: extern struct oR oUNIR;
                    834: extern struct oQ oUNIQ;
                    835: extern struct oMQ oUNIMQ;
                    836: extern struct oN oUNIN;
                    837: extern struct oUP2 oONEUP2;
                    838: extern struct oV oVAR[];
                    839: extern struct oV oPVAR[];
                    840: extern struct oVL oVLIST[];
                    841: extern struct oVL oPVLIST[];
                    842: extern VL CO,ALG;
                    843: extern VL PVL;
                    844: extern R ONER;
                    845: extern Q ONE;
                    846: extern MQ ONEM;
                    847: extern LM ONELM;
                    848: extern N ONEN;
                    849: extern UP2 ONEUP2;
                    850:
                    851: extern FILE *asir_out;
1.7       noro      852: #if defined(__GNUC__)
1.1       noro      853: extern const int sprime[];
                    854: #else
                    855: extern int sprime[];
                    856: #endif
1.14      noro      857:
                    858: extern int lprime_size;
                    859: extern int *lprime;
1.1       noro      860:
                    861: extern void (*addnumt[])();
                    862: extern void (*subnumt[])();
                    863: extern void (*mulnumt[])();
                    864: extern void (*divnumt[])();
                    865: extern void (*pwrnumt[])();
                    866: extern int (*cmpnumt[])();
                    867: extern void (*chsgnnumt[])();
                    868:
1.29      noro      869: extern int current_mod;
                    870: extern GEN_UP2 current_mod_gf2n;
                    871: extern int lm_lazy;
                    872: extern int current_ff;
                    873: extern V up_var;
                    874: extern V up2_var;
                    875: extern P current_gfs_ext;
                    876: extern int current_gfs_p;
                    877: extern int current_gfs_q;
                    878: extern int current_gfs_q1;
                    879: extern int *current_gfs_plus1;
                    880: extern int *current_gfs_ntoi;
                    881: extern int *current_gfs_iton;
                    882:
1.1       noro      883: /* prototypes */
                    884: int compui(VL,USINT,USINT);
1.6       noro      885: int compbytearray(VL,BYTEARRAY,BYTEARRAY);
1.1       noro      886:
                    887: void powermodup(UP,UP *);
                    888: void hybrid_powermodup(UP,UP *);
                    889:
                    890: void powertabup(UP,UP,UP *);
                    891: void hybrid_powertabup(UP,UP,UP *);
                    892:
                    893: void generic_powermodup(UP,UP,Q,UP *);
                    894: void hybrid_generic_powermodup(UP,UP,Q,UP *);
                    895:
                    896: void powermod1up(UP,UP *);
                    897: void hybrid_rembymulup_special(int,UP,UP,UP,UP *);
                    898: void hybrid_tmulup(int,UP,UP,int,UP *);
                    899: void hybrid_squareup(int,UP,UP *);
                    900: void hybrid_mulup(int,UP,UP,UP *);
                    901:
                    902: void getmod_lm(N *);
                    903:
                    904: int maxblenup(UP);
                    905: void monicup(UP,UP *);
                    906: void simpup(UP,UP *);
                    907: void simpnum(Num,Num *);
                    908: void decompp(P,Q,P *,P *);
                    909: void truncp(P,Q,P *);
                    910: void uremp(P,P,P *);
                    911: void ugcdp(P,P,P *);
                    912: void reversep(P,Q,P *);
                    913: void invmodp(P,Q,P *);
                    914: void addup(UP,UP,UP *);
                    915: void subup(UP,UP,UP *);
                    916: void chsgnup(UP,UP *);
                    917: void mulup(UP,UP,UP *);
                    918: void tmulup(UP,UP,int,UP *);
                    919: void squareup(UP,UP *);
                    920: void remup(UP,UP,UP *);
                    921: void remup_destructive(UP,UP);
                    922: void qrup(UP,UP,UP *,UP *);
                    923: void qrup_destructive(UP,UP);
                    924: void gcdup(UP,UP,UP *);
                    925: void reverseup(UP,int,UP *);
                    926: void invmodup(UP,int,UP *);
                    927: void pwrup(UP,Q,UP *);
                    928: void squarep_gf2n(VL,P,P *);
                    929: void kmulp(VL,P,P,P *);
                    930: void ksquarep(VL,P,P *);
                    931: void kmulup(UP,UP,UP *);
                    932: void ksquareup(UP,UP *);
                    933: void extractup(UP,int,int,UP *);
                    934: void copyup(UP,UP);
                    935: void c_copyup(UP,int,pointer *);
                    936: void kmulupmain(UP,UP,UP *);
                    937: void ksquareupmain(UP,UP *);
                    938: void rembymulup(UP,UP,UP *);
                    939: void rembymulup_special(UP,UP,UP,UP *);
                    940: void tkmulup(UP,UP,int,UP *);
                    941: void shiftup(UP,int,UP *);
                    942: void set_degreeup(UP,int);
                    943: void decompup(UP,int,UP *,UP *);
                    944: void truncup(UP,int,UP *);
                    945: void uptofmarray(int,UP,ModNum *);
                    946: void fmarraytoup(ModNum *,int,UP *);
                    947: void uiarraytoup(unsigned int **,int,int,UP *);
                    948: void adj_coefup(UP,N,N,UP *);
                    949: void uptolmup(UP,UP *);
                    950: void remcup(UP,N,UP *);
                    951: void fft_mulup(UP,UP,UP *);
                    952: void fft_squareup(UP,UP *);
                    953: void trunc_fft_mulup(UP,UP,int,UP *);
                    954: void shoup_fft_mulup(UP,UP,UP *);
                    955: void shoup_fft_squareup(UP,UP *);
                    956: void shoup_trunc_fft_mulup(UP,UP,int,UP *);
                    957: void crup(ModNum **,int,int *,int,N,UP *);
                    958: void shoup_crup(ModNum **,int,int *,int,N,N,UP *);
                    959: void squareup_gf2n(UP,UP *);
                    960: void powermodup_gf2n(UP,UP *);
                    961: void generic_powermodup_gf2n(UP,UP,Q,UP *);
                    962: void tracemodup_gf2n(UP,UP,Q,UP *);
                    963: void tracemodup_gf2n_slow(UP,UP,Q,UP *);
                    964: void tracemodup_gf2n_tab(UP,UP,Q,UP *);
                    965: void square_rem_tab_up_gf2n(UP,UP *,UP *);
                    966: void powertabup_gf2n(UP,UP,UP *);
                    967: void find_root_gf2n(UP,GF2N *);
                    968:
                    969: int cmpdl_matrix(int,DL,DL);
                    970: int cmpdl_order_pair(int,DL,DL);
                    971: int cmpdl_elim(int,DL,DL);
                    972: int cmpdl_blexrev(int,DL,DL);
                    973: int cmpdl_bgradrev(int,DL,DL);
                    974: int cmpdl_brevrev(int,DL,DL);
                    975: int cmpdl_brevgradlex(int,DL,DL);
                    976: int cmpdl_bgradlex(int,DL,DL);
                    977: int cmpdl_blex(int,DL,DL);
                    978: int cmpdl_revgradlex(int,DL,DL);
                    979: int cmpdl_gradlex(int,DL,DL);
                    980: int cmpdl_revlex(int,DL,DL);
                    981: int cmpdl_lex(int,DL,DL);
                    982: int compd(VL,DP,DP);
                    983: void adddl(int,DL,DL,DL *);
                    984: void divsdc(VL,DP,P,DP *);
                    985: void muldc(VL,DP,P,DP *);
                    986: void muldm(VL,DP,MP,DP *);
                    987: void muld(VL,DP,DP,DP *);
                    988: void chsgnd(DP,DP *);
                    989: void subd(VL,DP,DP,DP *);
                    990: void addd(VL,DP,DP,DP *);
                    991: int sugard(MP);
                    992: void nodetod(NODE,DP *);
                    993: void dtop(VL,VL,DP,P *);
                    994: void ptod(VL,VL,P,DP *);
                    995: void initd(struct order_spec *);
                    996:
                    997: void _printdp(DP);
                    998: void _dp_sp_mod(DP,DP,int,DP *);
                    999: void _dp_mod(DP,int,NODE,DP *);
                   1000: void _dp_red_mod(DP,DP,int,DP *);
                   1001: void _dtop_mod(VL,VL,DP,P *);
                   1002: void _mulmdm(VL,int,DP,MP,DP *);
                   1003: void _mulmd(VL,int,DP,DP,DP *);
                   1004: void _chsgnmd(int,DP,DP *);
                   1005: void _submd(VL,int,DP,DP,DP *);
                   1006: void _addmd(VL,int,DP,DP,DP *);
                   1007: void _mdtop(VL,int,VL,DP,P *);
                   1008: void divsmdc(VL,int,DP,P,DP *);
                   1009: void mulmdc(VL,int,DP,P,DP *);
                   1010: void mulmdm(VL,int,DP,MP,DP *);
                   1011: void mulmd(VL,int,DP,DP,DP *);
                   1012: void chsgnmd(int,DP,DP *);
                   1013: void submd(VL,int,DP,DP,DP *);
                   1014: void addmd(VL,int,DP,DP,DP *);
                   1015: void mdtop(VL,int,VL,DP,P *);
                   1016: void mptomd(VL,int,VL,P,DP *);
                   1017: void ptomd(VL,int,VL,P,DP *);
                   1018: int p_mag(P);
                   1019: int n_bits(N);
                   1020: void gcdBinary_27n(N,N,N *);
                   1021: void rtime_init(void);
                   1022: void setmod_gf2n(P);
                   1023: void mt_sgenrand(unsigned long);
                   1024: unsigned long mt_genrand(void);
                   1025: #if defined(VISUAL)
                   1026: void srandom(unsigned int);
                   1027: unsigned int random(void);
                   1028: #endif
                   1029: void gcdbmodn(N,N,N *);
                   1030: void gcdbinn(N,N,N *);
                   1031: void gcdmodn(N,N,N *);
                   1032: void gcdaccn(N,N,N *);
                   1033: void gcdEuclidn(N,N,N *);
                   1034: void GC_free(void *);
                   1035: void FFT_primes(int,int *,int *,int *);
                   1036: int FFT_pol_product(unsigned int,unsigned int *, unsigned int,unsigned int *,
                   1037:        unsigned int *,int,unsigned int *);
                   1038: int FFT_pol_square(unsigned int,unsigned int *,
                   1039:        unsigned int *,int,unsigned int *);
                   1040: void dcptolist(DCP,LIST *);
                   1041: void gcdprsmp(VL,int,P,P,P *);
                   1042: void mult_mod_tab(UM,int,UM *,UM,int);
                   1043: int nfctr_mod(UM,int);
                   1044: int irred_check(UM,int);
                   1045: void modfctrp(P,int,int,DCP *);
                   1046: void pf_init(void);
                   1047: void binaryton(char *,N *);
                   1048: void hexton(char *,N *);
                   1049: void ptolmp(P,P *);
                   1050: void lmptop(P,P *);
                   1051: void ulmptoum(int,UP,UM);
                   1052: void objtobobj(int,Obj,Obj *);
                   1053: void bobjtoobj(int,Obj,Obj *);
                   1054: void numtobnum(int,Num,Num *);
                   1055: void bnumtonum(int,Num,Num *);
                   1056: void ptobp(int,P,P *);
                   1057: void bptop(int,P,P *);
                   1058: void listtoblist(int,LIST,LIST *);
                   1059: void blisttolist(int,LIST,LIST *);
                   1060: void vecttobvect(int,VECT,VECT *);
                   1061: void bvecttovect(int,VECT,VECT *);
                   1062: void mattobmat(int,MAT,MAT *);
                   1063: void bmattomat(int,MAT,MAT *);
                   1064: void n32ton27(N,N *);
                   1065: void n27ton32(N,N *);
                   1066: void kmulum(int,UM,UM,UM);
                   1067: void saveobj(FILE *,Obj);
                   1068: void endian_init(void);
                   1069: void write_char(FILE *,unsigned char *);
                   1070: void write_short(FILE *,unsigned short *);
                   1071: void write_int(FILE *,unsigned int *);
                   1072: void write_double(FILE *,double *);
                   1073: void write_intarray(FILE *,unsigned int *,int);
                   1074: void write_string(FILE *,unsigned char *,int);
                   1075: void savestr(FILE *,char *);
                   1076: void loadstr(FILE *,char **);
                   1077: void savevl(FILE *,VL);
                   1078: void loadvl(FILE *);
                   1079: void skipvl(FILE *);
                   1080: void savev(FILE *,V);
                   1081: void loadv(FILE *,V *);
                   1082: int save_convv(V);
                   1083: V load_convv(int);
                   1084: void swap_bytes(char *,int,int);
                   1085: void read_char(FILE *,unsigned char *);
                   1086: void read_short(FILE *,unsigned short *);
                   1087: void read_int(FILE *,unsigned int *);
                   1088: void read_double(FILE *,double *);
                   1089: void read_intarray(FILE *,unsigned int *,int);
                   1090: void read_string(FILE *,unsigned char *,int);
                   1091: void loadobj(FILE *,Obj *);
                   1092: void invum(int,UM,UM,UM);
                   1093: void addarray_to(unsigned int *,int,unsigned int *,int);
                   1094: void muln_1(unsigned int *,int,unsigned int,unsigned int *);
                   1095: unsigned int divn_1(unsigned int *,int,unsigned int,unsigned int *);
                   1096: void ptoup(P,UP *);
                   1097: void uptop(UP,P *);
                   1098: void printnum(Num);
                   1099: void printv(VL,V);
                   1100: void kmulq(Q,Q,Q *);
                   1101: void bshiftn(N,int,N *);
                   1102: void remn(N,N,N*);
                   1103: void simplm(LM,LM *);
                   1104: void qtolm(Q,LM *);
                   1105: int qpcheck(Obj);
                   1106: int headsgn(P);
                   1107: void adjsgn(P,DCP);
                   1108: void setmod_g2n(P);
                   1109: void simpgf2n(GF2N,GF2N *);
                   1110: void ptogf2n(Obj,GF2N *);
                   1111: void gf2ntop(GF2N,P *);
                   1112: void gf2ntovect(GF2N,VECT *);
                   1113: void squaregf2n(GF2N,GF2N *);
                   1114: void randomgf2n(GF2N *);
                   1115: void invgf2n(GF2N,GF2N *);
                   1116: void kmuln(N,N,N *);
                   1117: void extractn(N,int,int,N *);
                   1118: void copyn(N,int,int *);
                   1119: void kmulnmain(N,N,N *);
                   1120: int qcoefp(Obj);
                   1121: int qcoefr(Obj);
                   1122: int get_allocwords(void);
                   1123: double get_clock(void);
                   1124: void get_eg(struct oEGT *);
                   1125: void printtime(struct oEGT *,struct oEGT *,double);
                   1126: void init_eg(struct oEGT *);
                   1127: void add_eg(struct oEGT *,struct oEGT *,struct oEGT *);
                   1128: void print_eg(char *,struct oEGT *);
                   1129: void print_split_eg(struct oEGT *,struct oEGT *);
                   1130: void print_split_e(struct oEGT *,struct oEGT *);
                   1131: void suspend_timer(void);
                   1132: void resume_timer(void);
                   1133: void reset_engine(void);
                   1134: void notdef(VL,Obj,Obj,Obj *);
                   1135: void error(char *);
                   1136: void ptoup2(P,UP2 *);
                   1137: void ptoup2_sparse(P,UP2 *);
                   1138: void up2top(UP2,P *);
                   1139: void up2tovect(UP2,VECT *);
                   1140: void up2ton(UP2,Q *);
                   1141: void ntoup2(Q,UP2 *);
                   1142: void gen_simpup2(UP2,GEN_UP2,UP2 *);
                   1143: void gen_simpup2_destructive(UP2,GEN_UP2);
                   1144: void gen_invup2(UP2,GEN_UP2,UP2 *);
                   1145: void gen_pwrmodup2(UP2,Q,GEN_UP2,UP2 *);
                   1146: void simpup2(UP2,UP2,UP2 *);
                   1147: int degup2(UP2);
                   1148: int degup2_sparse(UP2);
                   1149: int degup2_1(unsigned int);
                   1150: void addup2(UP2,UP2,UP2 *);
                   1151: void subup2(UP2,UP2,UP2 *);
                   1152: void mulup2_n1(unsigned int *,int,unsigned int,unsigned int *);
                   1153: void mulup2_nh(unsigned int *,int,unsigned int,unsigned int *);
                   1154: void _mulup2_1(UP2,unsigned int,UP2);
                   1155: void _mulup2_h(UP2,unsigned int,UP2);
                   1156: void mulup2(UP2,UP2,UP2 *);
                   1157: void _kmulup2_(unsigned int *,unsigned int *,int,unsigned int *);
                   1158: void _mulup2_nn(unsigned int *,unsigned int *,int,unsigned int *);
                   1159: void _mulup2(UP2,UP2,UP2);
                   1160: void _mulup2_(_UP2,_UP2,_UP2);
                   1161: void squareup2(UP2,UP2 *);
                   1162: void _adjup2(UP2);
                   1163: void _adjup2_(_UP2);
                   1164: void _addup2(UP2,UP2,UP2);
                   1165: void _addup2_destructive(UP2,UP2);
                   1166: void _addup2_(_UP2,_UP2,_UP2);
                   1167: void _addtoup2_(_UP2,_UP2);
                   1168: unsigned int mulup2_bb(unsigned int,unsigned int);
                   1169: void init_up2_tab(void);
                   1170: unsigned int quoup2_11(unsigned int,unsigned int);
                   1171: void divup2_1(unsigned int,unsigned int,int,int,unsigned int *,unsigned int *);
                   1172: void qrup2(UP2,UP2,UP2 *,UP2 *);
                   1173: void _qrup2(UP2,UP2,UP2,UP2);
                   1174: void remup2(UP2,UP2,UP2 *);
                   1175: void _remup2(UP2,UP2,UP2);
                   1176: void remup2_sparse(UP2,UP2,UP2 *);
                   1177: void remup2_sparse_destructive(UP2,UP2);
                   1178: void remup2_type1_destructive(UP2,int);
                   1179: void remup2_3_destructive(UP2,UP2);
                   1180: void remup2_5_destructive(UP2,UP2);
                   1181: void _invup2_1(unsigned int,unsigned int,unsigned int *,unsigned int *);
                   1182: void _gcdup2_1(unsigned int,unsigned int,unsigned int *);
                   1183: void up2_init_eg(void);
                   1184: void up2_show_eg(void);
                   1185: void invup2(UP2,UP2,UP2 *);
                   1186: void gcdup2(UP2,UP2,UP2 *);
                   1187: void chsgnup2(UP2,UP2 *);
                   1188: void pwrmodup2(UP2,Q,UP2,UP2 *);
                   1189: void pwrmodup2_sparse(UP2,Q,UP2,UP2 *);
                   1190: int compup2(UP2,UP2);
                   1191: void printup2(UP2);
                   1192: void _copyup2(UP2,UP2);
                   1193: void _bshiftup2(UP2,int,UP2);
                   1194: void _bshiftup2_destructive(UP2,int);
                   1195: void diffup2(UP2,UP2 *);
                   1196: int sqfrcheckup2(UP2);
                   1197: int irredcheckup2(UP2);
                   1198: int irredcheck_dddup2(UP2);
                   1199: void _copy_up2bits(UP2,unsigned int **,int);
                   1200: void _print_frobmat(unsigned int **,int,int);
                   1201: int compute_multiplication_matrix(P,GF2MAT *);
                   1202: void compute_change_of_basis_matrix(P,P,int,GF2MAT *,GF2MAT *);
                   1203: int compute_representation_conversion_matrix(P,GF2MAT *,GF2MAT *);
                   1204: void mul_nb(GF2MAT,unsigned int *,unsigned int *,unsigned int *);
                   1205: void leftshift(unsigned int *,int);
                   1206: void mat_to_gf2mat(MAT,unsigned int ***);
                   1207: void gf2mat_to_mat(unsigned int **,int,MAT *);
                   1208: void mulgf2mat(int,unsigned int **,unsigned int **,unsigned int **);
                   1209: void mulgf2vectmat(int,unsigned int *,unsigned int **,unsigned int *);
                   1210: int mulgf2vectvect(int,unsigned int *,unsigned int *);
                   1211: int invgf2mat(int,unsigned int **,unsigned int **);
                   1212: void _mulup2_11(unsigned int,unsigned int,unsigned int *);
                   1213: void _mulup2_22(unsigned int *,unsigned int *,unsigned int *);
                   1214: void _mulup2_33(unsigned int *,unsigned int *,unsigned int *);
                   1215: void _mulup2_44(unsigned int *,unsigned int *,unsigned int *);
                   1216: void _mulup2_55(unsigned int *,unsigned int *,unsigned int *);
                   1217: void _mulup2_66(unsigned int *,unsigned int *,unsigned int *);
                   1218: void printup2_(unsigned int *,int);
                   1219: void type1_bin_invup2(UP2,int,UP2 *);
                   1220: int int_bits(int);
                   1221:
                   1222:
                   1223: LUM LUMALLOC(int, int);
1.16      noro     1224: BM BMALLOC(int, int);
1.1       noro     1225: Obj ToAlg(Num);
                   1226: UM *berlemain(register int, UM, UM *);
                   1227: void *Risa_GC_malloc(size_t);
                   1228: void *Risa_GC_malloc_atomic(size_t);
                   1229: void *Risa_GC_realloc(void *,size_t);
                   1230: void *GC_malloc(size_t);
                   1231: void *GC_malloc_atomic(size_t);
                   1232: void *GC_realloc(void *,size_t);
                   1233: double NatToReal(N,int *);
                   1234: double RatnToReal(Q);
                   1235: double pwrreal0(double,int);
1.3       noro     1236: double rtodbl(); /* XXX */
1.1       noro     1237: int **almat(int,int);
                   1238: pointer **almat_pointer(int,int);
                   1239: int berlecnt(register int,UM);
                   1240: int berlecntmain(register int,int,int,register int **);
                   1241: int cmpalg(Num,Num);
                   1242: int cmpbf(Num,Num);
                   1243: int cmpcplx(Num,Num);
                   1244: int cmpn(N,N);
                   1245: int cmpq(Q,Q);
                   1246: int cmpreal(Real,Real);
                   1247: int cmpmi(MQ,MQ);
                   1248: int cmplm(LM,LM);
                   1249: int compmat(VL,MAT,MAT);
                   1250: int compnum(VL,Num,Num);
                   1251: int compp(VL,P,P);
                   1252: int compr(VL,Obj,Obj);
                   1253: int compstr(VL,STRING,STRING);
                   1254: int compvect(VL,VECT,VECT);
                   1255: int ctest(P,ML,int,int *);
                   1256: int cycchk(P);
                   1257: int dbound(V,P);
                   1258: int dcomp(P,P);
                   1259: int deg(V,P);
                   1260: int degtest(int,int *,ML,int);
                   1261: int divcheck(VL,P *,int,P,P);
                   1262: unsigned int divin(N,unsigned int,N *);
                   1263: int divtdcpz(VL,P,P,P *);
                   1264: int divtpz(VL,P,P,P *);
                   1265: int divum(register int,UM,UM,UM);
                   1266: int dm(int,int,int *);
                   1267: int dmb(int,int,int,int *);
                   1268: int dma(int,int,int,int *);
                   1269: int dmab(int,int,int,int,int *);
                   1270: int dmar(int,int,int,int);
                   1271: int dtestmain(P,Q,ML,int,int *,P *,P *);
                   1272: int geldb(VL,P);
                   1273: int getchomdeg(V,P);
                   1274: int getdeg(V,P);
                   1275: int getlchomdeg(V,P,int *);
1.29      noro     1276: int get_lprime(int);
1.1       noro     1277: int homdeg(P);
                   1278: unsigned int invm(unsigned int,int);
                   1279: int iscycm(P);
                   1280: int iscycp(P);
                   1281: int lengthp(P);
                   1282: int mig(int,int,P);
                   1283: int mignotte(int,P);
                   1284: int minimain(register int,int,int,register int **);
                   1285: int ncombi(int,int,int,int *);
                   1286: int nextbin(VN,int);
                   1287: int nmonop(P);
                   1288: int pcoef(VL,VL,P,P *);
                   1289: int pcoef0(VL,VL,P,P *);
                   1290: unsigned int pwrm(register int,register int,int);
1.29      noro     1291: unsigned int rem(N,int);
1.1       noro     1292: int sqfrchk(P);
                   1293: int subn(N,N,N *);
                   1294: int ucmpp(P,P);
                   1295: int valideval(VL,DCP,VN);
                   1296: int zerovpchk(VL,P,VN);
                   1297:
                   1298: void addgf2n(GF2N,GF2N,GF2N *);
                   1299: void subgf2n(GF2N,GF2N,GF2N *);
                   1300: void mulgf2n(GF2N,GF2N,GF2N *);
                   1301: void divgf2n(GF2N,GF2N,GF2N *);
                   1302: void chsgngf2n(GF2N,GF2N *);
                   1303: void pwrgf2n(GF2N,Q, GF2N *);
                   1304: int cmpgf2n(GF2N,GF2N);
                   1305:
                   1306: void addgfpn(GFPN,GFPN,GFPN *);
                   1307: void subgfpn(GFPN,GFPN,GFPN *);
                   1308: void mulgfpn(GFPN,GFPN,GFPN *);
                   1309: void divgfpn(GFPN,GFPN,GFPN *);
                   1310: void chsgngfpn(GFPN,GFPN *);
                   1311: void pwrgfpn(GFPN,Q, GFPN *);
                   1312: int cmpgfpn(GFPN,GFPN);
1.12      noro     1313:
                   1314: void addgfs(GFS,GFS,GFS *);
                   1315: void subgfs(GFS,GFS,GFS *);
                   1316: void mulgfs(GFS,GFS,GFS *);
                   1317: void divgfs(GFS,GFS,GFS *);
                   1318: void chsgngfs(GFS,GFS *);
                   1319: void pwrgfs(GFS,Q, GFS *);
                   1320: int cmpgfs(GFS,GFS);
1.20      noro     1321:
1.21      noro     1322: void addgfsn(GFSN,GFSN,GFSN *);
                   1323: void subgfsn(GFSN,GFSN,GFSN *);
                   1324: void mulgfsn(GFSN,GFSN,GFSN *);
                   1325: void divgfsn(GFSN,GFSN,GFSN *);
                   1326: void chsgngfsn(GFSN,GFSN *);
                   1327: void pwrgfsn(GFSN,Q, GFSN *);
                   1328: int cmpgfsn(GFSN,GFSN);
1.1       noro     1329:
                   1330: void addalg(Num,Num,Num *);
                   1331: void addbf(Num,Num,Num *);
                   1332: void addcplx(Num,Num,Num *);
                   1333: void addm2p(VL,Q,Q,P,P,P *);
                   1334: void addm2q(Q,Q,Q,Q,Q *);
                   1335: void addmat(VL,MAT,MAT,MAT *);
                   1336: void addmp(VL,int,P,P,P *);
                   1337: void addmpq(int,P,P,P *);
                   1338: void addmptoc(VL,int,P,P,P *);
                   1339: void addmq(int,MQ,MQ,MQ *);
                   1340: void addn(N,N,N *);
                   1341: void addnum(VL,Num,Num,Num *);
                   1342: void addp(VL,P,P,P *);
                   1343: void addpadic(int,int,unsigned int *,unsigned int *);
                   1344: void addpq(P,P,P *);
                   1345: void addptoc(VL,P,P,P *);
                   1346: void addq(Q,Q,Q *);
                   1347: void addr(VL,Obj,Obj,Obj *);
                   1348: void addreal(Num,Num,Real *);
                   1349: void addmi(MQ,MQ,MQ *);
                   1350: void addlm(LM,LM,LM *);
                   1351: void addstr(VL,STRING,STRING,STRING *);
                   1352: void addum(int,UM,UM,UM);
                   1353: void addvect(VL,VECT,VECT,VECT *);
1.19      noro     1354: void addquote(VL,QUOTE,QUOTE,QUOTE *);
1.1       noro     1355: void adjc(VL,P,P,P,Q,P *,P *);
                   1356: void afctr(VL,P,P,DCP *);
                   1357: void afctrmain(VL,P,P,int,DCP *);
                   1358: void affine(VL,P,VN,P *);
                   1359: void affinemain(VL,P,V,int,P *,P *);
                   1360: void berle(int,int,P,ML *);
                   1361: void bnton(register int,N,N *);
                   1362: void cbound(VL,P,Q *);
                   1363: void chnrem(int,V,P,Q,UM,P *,Q *);
                   1364: void chnremp(VL,int,P,Q,P,P *);
                   1365: void chsgnalg(Num,Num *);
                   1366: void chsgnbf(Num a,Num *);
                   1367: void chsgncplx(Num,Num *);
                   1368: void chsgnmat(MAT,MAT *);
                   1369: void chsgnmp(int,P,P *);
                   1370: void chsgnnum(Num,Num *);
                   1371: void chsgnp(P,P *);
                   1372: void chsgnq(Q,Q *);
                   1373: void chsgnr(Obj,Obj *);
                   1374: void chsgnreal(Num,Num *);
                   1375: void chsgnmi(MQ,MQ *);
                   1376: void chsgnlm(LM,LM *);
                   1377: void chsgnvect(VECT,VECT *);
1.19      noro     1378: void chsgnquote(QUOTE,QUOTE *);
1.1       noro     1379: void clctv(VL,P,VL *);
                   1380: void clctvr(VL,Obj,VL *);
                   1381: void cm2p(Q,Q,P,P *);
                   1382: void cmax(P,Q *);
                   1383: void cmp(Q,P,P *);
                   1384: void coefp(P,int,P *);
                   1385: void cpylum(int,LUM,LUM);
                   1386: void cpyum(UM,UM);
                   1387: void csump(VL,P,Q *);
                   1388: void cycm(V,register int,DCP *);
                   1389: void cycp(V,register int,DCP *);
                   1390: void degp(V,P,Q *);
                   1391: void degum(UM,int);
                   1392: void detmp(VL,int,P **,int,P *);
                   1393: void detp(VL,P **,int,P *);
                   1394: void diffp(VL,P,V,P *);
                   1395: void diffum(register int,UM,UM);
                   1396: void divalg(Num,Num,Num *);
                   1397: void divbf(Num,Num,Num *);
                   1398: void divcp(P,Q,P *);
                   1399: void divcplx(Num,Num,Num *);
                   1400: void divmat(VL,Obj,Obj,Obj *);
                   1401: void divmq(int,MQ,MQ,MQ *);
                   1402: void divn(N,N,N *,N *);
                   1403: void divnmain(int,int,unsigned int *,unsigned int *,unsigned int *);
                   1404: void divnum(VL,Num,Num,Num *);
                   1405: void divq(Q,Q,Q *);
                   1406: void divr(VL,Obj,Obj,Obj *);
                   1407: void divreal(Num,Num,Real *);
                   1408: void divmi(MQ,MQ,MQ *);
                   1409: void divlm(LM,LM,LM *);
                   1410: void divsdcmp(VL,int,P,P,P *);
                   1411: void divsdcp(VL,P,P,P *);
                   1412: void divsmp(VL,int,P,P,P *);
                   1413: void divsn(N,N,N *);
                   1414: void divsp(VL,P,P,P *);
                   1415: void divsrdcmp(VL,int,P,P,P *,P *);
                   1416: void divsrdcp(VL,P,P,P *,P *);
                   1417: void divsrmp(VL,int,P,P,P *,P *);
                   1418: void divsrp(VL,P,P,P *,P *);
                   1419: void divvect(VL,Obj,Obj,Obj *);
1.19      noro     1420: void divquote(VL,QUOTE,QUOTE,QUOTE *);
1.1       noro     1421: void dtest(P,ML,int,DCP *);
                   1422: void dtestroot(int,int,P,LUM,struct oDUM *,DCP *);
                   1423: void dtestroot1(int,int,P,LUM,P *);
                   1424: void dtestsq(int,int,P,LUM,P *);
                   1425: void dtestsql(P,ML,struct oDUM *,DCP *);
                   1426: void estimatelc(VL,Q,DCP,VN,P *);
                   1427: void eucum(register int,UM,UM,UM,UM);
                   1428: void exthp(VL,P,int,P *);
                   1429: void exthpc(VL,V,P,int,P *);
                   1430: void ezgcd1p(VL,P,P,P *);
                   1431: void ezgcdhensel(P,int,UM,UM,ML *);
                   1432: void ezgcdnp(VL,P,P *,int,P *);
                   1433: void ezgcdnpp(VL,DCP,P *,int,P *);
                   1434: void ezgcdnpz(VL,P *,int,P *);
                   1435: void ezgcdp(VL,P,P,P *);
                   1436: void ezgcdpp(VL,DCP,P,P *);
                   1437: void ezgcdpz(VL,P,P,P *);
                   1438: void factorial(int,Q *);
                   1439: void fctrp(VL,P,DCP *);
                   1440: void fctrwithmvp(VL,P,V,DCP *);
                   1441: void gcda(VL,P,P,P,P *);
                   1442: void gcdcp(VL,P,P *);
                   1443: void gcdgen(P,ML,ML *);
                   1444: void gcdmonomial(VL,DCP *,int,P *);
                   1445: void gcdn(N,N,N *);
                   1446: void gcdprsp(VL,P,P,P *);
                   1447: void gcdum(register int,UM,UM,UM);
                   1448: void getmindeg(V,P,Q *);
                   1449: void henmain(LUM,ML,ML,ML *);
                   1450: void henmv(VL,VN,P,P,P,P,P,P,P,P,P,Q,int,P *,P *);
                   1451: void henmvmain(VL,VN,P,P,P,P,P,P,P,Q,Q,int,P *,P *);
                   1452: void henprep(P,ML,ML,ML *,ML *);
                   1453: void hensel(int,int,P,ML *);
                   1454: void henzq(P,P,UM,P,UM,int,int,P *,P *,P *,P *,Q *);
                   1455: void henzq1(P,P,Q,P *,P *,Q *);
                   1456: void hsq(int,int,P,int *,DCP *);
                   1457: void intersectv(VL,VL,VL *);
                   1458: void invl(Q,Q,Q *);
                   1459: void invmq(int,MQ,MQ *);
                   1460: void invq(Q,Q *);
                   1461: void lgp(P,N *,N *);
                   1462: void lumtop(V,int,int,LUM,P *);
                   1463: void markv(VN,int,P);
                   1464: void maxdegp(VL,P,VL *,P *);
                   1465: void mergev(VL,VL,VL,VL *);
                   1466: void mfctr(VL,P,DCP *);
                   1467: void mfctrhen2(VL,VN,P,P,P,P,P,P,P *);
                   1468: void mfctrmain(VL,P,DCP *);
                   1469: void mfctrwithmv(VL,P,V,DCP *);
                   1470: void min_common_vars_in_coefp(VL,P,VL *,P *);
                   1471: void minchdegp(VL,P,VL *,P *);
                   1472: void mindegp(VL,P,VL *,P *);
                   1473: void mini(register int,UM,UM);
                   1474: void minlcdegp(VL,P,VL *,P *);
                   1475: void mkbc(int,Q *);
                   1476: void mkbcm(int,int,MQ *);
                   1477: void mkssum(V,int,int,int,P *);
                   1478: void monomialfctr(VL,P,P *,DCP *);
                   1479: void mptop(P,P *);
                   1480: void mptoum(P,UM);
                   1481: void msqfr(VL,P,DCP *);
                   1482: void msqfrmain(VL,P,DCP *);
                   1483: void msqfrmainmain(VL,P,VN,P,DCP,DCP *,P *);
                   1484: void mulalg(Num,Num,Num *);
                   1485: void mulbf(Num,Num,Num *);
                   1486: void mulcplx(Num,Num,Num *);
                   1487: void mulin(N,unsigned int,unsigned int *);
                   1488: void mullum(int,int,LUM,LUM,LUM);
                   1489: void mullumarray(P,ML,int,int *,P *);
                   1490: void mulm2p(VL,Q,Q,P,P,P *);
                   1491: void mulm2q(Q,Q,Q,Q,Q *);
                   1492: void mulmat(VL,Obj,Obj,Obj *);
                   1493: void mulmatmat(VL,MAT,MAT,MAT *);
                   1494: void mulmatvect(VL,MAT,VECT,VECT *);
                   1495: void mulmp(VL,int,P,P,P *);
                   1496: void mulmpc(VL,int,P,P,P *);
                   1497: void mulmpq(int,P,P,P *);
                   1498: void mulmq(int,MQ,MQ,MQ *);
                   1499: void muln(N,N,N *);
                   1500: void mulnum(VL,Num,Num,Num *);
                   1501: void mulp(VL,P,P,P *);
                   1502: void mulpadic(int,int,unsigned int *,unsigned int *,unsigned int *);
                   1503: void mulpc(VL,P,P,P *);
                   1504: void mulpq(P,P,P *);
                   1505: void mulq(Q,Q,Q *);
                   1506: void mulr(VL,Obj,Obj,Obj *);
                   1507: void mulreal(Num,Num,Real *);
                   1508: void mulmi(MQ,MQ,MQ *);
                   1509: void mullm(LM,LM,LM *);
                   1510: void mulrmat(VL,Obj,MAT,MAT *);
                   1511: void mulrvect(VL,Obj,VECT,VECT *);
                   1512: void mulsgn(VN,VN,int,VN);
                   1513: void mulsum(register int,UM,register int,UM);
                   1514: void mulum(register int,UM,UM,UM);
                   1515: void mulvect(VL,Obj,Obj,Obj *);
1.19      noro     1516: void mulquote(VL,QUOTE,QUOTE,QUOTE *);
1.1       noro     1517: void mulvectmat(VL,VECT,MAT,VECT *);
                   1518: void next(VN);
                   1519: void nezgcdnp_sqfr_primitive(VL,P,P *,int,P *);
                   1520: void nezgcdnpp(VL,DCP,P *,int,P *);
                   1521: void nezgcdnpz(VL,P *,int,P *);
                   1522: void nezgcdnpzmain(VL,P *,int,P *);
                   1523: void nglob_init(void);
                   1524: void norm(P,Q *);
                   1525: void norm1(P,P *);
                   1526: void norm1c(P,Q *);
                   1527: void normalizemp(int,P);
                   1528: void nthrootchk(P,struct oDUM *,ML,DCP *);
                   1529: void nthrootn(N,int,N *);
                   1530: void ntobn(register int,N,N *);
                   1531: void nuezgcdnpzmain(VL,P *,int,P *);
                   1532: void padictoq(int,int,int *,Q *);
                   1533: void risa_pari_init(void);
                   1534: void pcp(VL,P,P *,P *);
                   1535: void pderivr(VL,Obj,V,Obj *);
                   1536: void pdiva(VL,P,P,P,P *);
                   1537: void pinva(P,P,P *);
                   1538: void plisttop(P *,V,int,P *);
                   1539: void pmonic(VL,P,P,P *);
                   1540: void pqra(VL,P,P,P,P *,P *);
                   1541: void premmp(VL,int,P,P,P *);
                   1542: void premp(VL,P,P,P *);
                   1543: void ptolum(int,int,P,LUM);
                   1544: void ptomp(int,P,P *);
                   1545: void ptoum(int,P,UM);
                   1546: void ptozp(P,int,Q *,P *);
                   1547: void ptozp0(P,P *);
                   1548: void pwralg(Num,Num,Num *);
                   1549: void pwrbf(Num,Num,Num *);
                   1550: void pwrcplx(Num,Num,Num *);
                   1551: void pwrcplx0(Num,int,Num *);
                   1552: void pwrlum(int,int,LUM,int,LUM);
                   1553: void pwrmat(VL,MAT,Obj,MAT *);
                   1554: void pwrmatmain(VL,MAT,int,MAT *);
                   1555: void pwrmp(VL,int,P,Q,P *);
                   1556: void pwrmq(int,MQ,Q,MQ *);
                   1557: void pwrn(N,int,N *);
                   1558: void pwrnum(VL,Num,Num,Num *);
                   1559: void pwrp(VL,P,Q,P *);
                   1560: void pwrq(Q,Q,Q *);
                   1561: void pwrr(VL,Obj,Obj,Obj *);
1.19      noro     1562: void pwrquote(VL,QUOTE,QUOTE,QUOTE *);
1.1       noro     1563: void pwrreal(Num,Num,Real *);
                   1564: void pwrmi(MQ,Q,MQ *);
                   1565: void pwrlm(LM,Q,LM *);
                   1566: void pwrum(int,UM,int,UM);
                   1567: void reallocarray(char **,int *,int *,int);
                   1568: void reductr(VL,Obj,Obj *);
                   1569: void reimtocplx(Num,Num,Num *);
                   1570: void rem2q(Q,Q,Q,Q *);
                   1571: void rema(VL,P,P,P,P *);
                   1572: void remq(Q,Q,Q *);
                   1573: void remsdcp(VL,P,P,P *);
                   1574: void reordermp(VL,int,VL,P,P *);
                   1575: void reorderp(VL,VL,P,P *);
                   1576: void reordvar(VL,V,VL *);
                   1577: void res_ch_det(VL,V,P,P,P *);
                   1578: void res_detmp(VL,int,V,P,P,P *);
                   1579: void restore(VL,P,VN,P *);
                   1580: void resultmp(VL,int,V,P,P,P *);
                   1581: void resultp(VL,V,P,P,P *);
                   1582: void setlum(int,int,LUM);
                   1583: void sort_by_deg(int,P *,P *);
                   1584: void sort_by_deg_rev(int,P *,P *);
                   1585: void sortfs(DCP *);
                   1586: void sortfsrev(DCP *);
                   1587: void sortplist(P *,int);
                   1588: void sortplistbyhomdeg(P *,int);
                   1589: void sprs(VL,V,P,P,P *);
                   1590: void sqa(VL,P,P,DCP *);
                   1591: void sqad(unsigned int,int);
                   1592: void sqfrp(VL,P,DCP *);
                   1593: void sqfrum(int,int,P,int *,struct oDUM **,ML *);
                   1594: void sqfrummain(int,UM,UM,struct oDUM **);
                   1595: void sqrtn(N,N *);
                   1596: void srch2(VL,V,P,P,P *);
                   1597: void srchmp(VL,int,V,P,P,P *);
                   1598: void srchump(int,P,P,P *);
                   1599: void srcr(VL,V,P,P,P *);
                   1600: void strtobf(char *,BF *);
                   1601: void subalg(Num,Num,Num *);
                   1602: void subbf(Num,Num,Num *);
                   1603: void subcplx(Num,Num,Num *);
                   1604: void subm2p(VL,Q,Q,P,P,P *);
                   1605: void subm2q(Q,Q,Q,Q,Q *);
                   1606: void submat(VL,MAT,MAT,MAT *);
                   1607: void submp(VL,int,P,P,P *);
                   1608: void submq(int,MQ,MQ,MQ *);
                   1609: void subnum(VL,Num,Num,Num *);
                   1610: void subp(VL,P,P,P *);
                   1611: void subq(Q,Q,Q *);
                   1612: void subr(VL,Obj,Obj,Obj *);
                   1613: void subreal(Num,Num,Real *);
                   1614: void submi(MQ,MQ,MQ *);
                   1615: void sublm(LM,LM,LM *);
                   1616: void substmp(VL,int,P,V,P,P *);
                   1617: void substp(VL,P,V,P,P *);
                   1618: void substvp(VL,P,VN,P *);
                   1619: void subum(int,UM,UM,UM);
                   1620: void subvect(VL,VECT,VECT,VECT *);
1.19      noro     1621: void subquote(VL,QUOTE,QUOTE,QUOTE *);
1.1       noro     1622: void toreim(Num,Num *,Num *);
                   1623: void ucsump(P,Q *);
                   1624: void udivpwm(Q,P,P,P *,P *);
                   1625: void udivpz(P,P,P *,P *);
                   1626: void udivpzwm(Q,P,P,P *,P *);
                   1627: void uexgcdnp(VL,P,P *,int,VN,Q,P *,P *,P *,P *,Q *);
                   1628: void uezgcd1p(P,P,P *);
                   1629: void uezgcdpp(DCP,P,P *);
                   1630: void uezgcdpz(VL,P,P,P *);
                   1631: void ufctr(P,int,DCP *);
                   1632: void ufctrmain(P,int,DCP *);
                   1633: void umtomp(V,UM,P *);
                   1634: void umtop(V,UM,P *);
                   1635: void usqp(P,DCP *);
                   1636: void vntovl(VN,int,VL *);
1.29      noro     1637:
                   1638: void saveerror(FILE *,ERR);
                   1639: void saveui(FILE *,USINT);
                   1640: void savedp(FILE *,DP);
                   1641: void savestring(FILE *,STRING);
                   1642: void savemat(FILE *,MAT);
                   1643: void savevect(FILE *,VECT);
                   1644: void savelist(FILE *,LIST);
                   1645: void saver(FILE *,R);
                   1646: void savep(FILE *,P);
                   1647: void savegf2n(FILE *,GF2N);
                   1648: void savegfpn(FILE *,GFPN);
                   1649: void savegfs(FILE *,GFS);
                   1650: void savelm(FILE *,LM);
                   1651: void savemi(FILE *,MQ);
                   1652: void savecplx(FILE *,C);
                   1653: void savebf(FILE *,BF);
                   1654: void savereal(FILE *,Real);
                   1655: void saveq(FILE *,Q);
                   1656: void savenum(FILE *,Num);
                   1657: void savepfins(FILE *,V);
                   1658: void savegfmmat(FILE *,GFMMAT);
                   1659: void savebytearray(FILE *,BYTEARRAY);
                   1660: void savegfsn(FILE *,GFSN);
                   1661:
                   1662: void loaderror(FILE *,ERR *);
                   1663: void loadui(FILE *,USINT *);
                   1664: void loaddp(FILE *,DP *);
                   1665: void loadstring(FILE *,STRING *);
                   1666: void loadmat(FILE *,MAT *);
                   1667: void loadvect(FILE *,VECT *);
                   1668: void loadlist(FILE *,LIST *);
                   1669: void loadr(FILE *,R *);
                   1670: void loadp(FILE *,P *);
                   1671: void loadgf2n(FILE *,GF2N *);
                   1672: void loadgfpn(FILE *,GFPN *);
                   1673: void loadgfs(FILE *,GFS *);
                   1674: void loadgfsn(FILE *,GFSN *);
                   1675: void loadlm(FILE *,LM *);
                   1676: void loadmi(FILE *,MQ *);
                   1677: void loadcplx(FILE *,C *);
                   1678: void loadbf(FILE *,BF *);
                   1679: void loadreal(FILE *,Real *);
                   1680: void loadq(FILE *,Q *);
                   1681: void loadnum(FILE *,Num *);
                   1682: void loadgfmmat(FILE *,GFMMAT *);
                   1683: void loadbytearray(FILE *,BYTEARRAY *);
                   1684: V loadpfins(FILE *);
                   1685: void eucum2(int mod,UM f1,UM f2,UM a,UM b);
                   1686: void clearum(UM p,int n);
                   1687: BM BMALLOC(int dx,int dy);
                   1688: int isequalum(UM f1,UM f2);
                   1689: void dec_um(int p,int a,UM u);
                   1690: void setmod_sf(int p,int n);
                   1691: int search_defpoly_and_primitive_root(int p,int n,UM dp);
                   1692: void generate_defpoly_um(int p,int n,UM dp);
                   1693: int generate_primitive_root_enc(int p,int n,UM dp);
                   1694: int mulremum_enc(int p,int n,UM dp,int a,int b);
                   1695: void gfs_galois_action(GFS a,Q e,GFS *c);
                   1696: void gfs_embed(GFS z,int k,int pm,GFS *c);
                   1697: void qtogfs(Q a,GFS *c);
                   1698: void mqtogfs(MQ a,GFS *c);
                   1699: void gfstomq(GFS a,MQ *c);
                   1700: void ntogfs(Obj a,GFS *b);
                   1701: void addgfs(GFS a,GFS b,GFS *c);
                   1702: void subgfs(GFS a,GFS b,GFS *c);
                   1703: void mulgfs(GFS a,GFS b,GFS *c);
                   1704: void divgfs(GFS a,GFS b,GFS *c);
                   1705: void chsgngfs(GFS a,GFS *c);
                   1706: void pwrgfs(GFS a,Q b,GFS *c);
                   1707: int cmpgfs(GFS a,GFS b);
                   1708: void randomgfs(GFS *r);
                   1709: int _addsf(int a,int b);
                   1710: int _chsgnsf(int a);
                   1711: int _subsf(int a,int b);
                   1712: int _mulsf(int a,int b);
                   1713: int _invsf(int a);
                   1714: int _divsf(int a,int b);
                   1715: int _pwrsf(int a,int b);
                   1716: int _onesf();
                   1717: int _itosf(int n);
                   1718: int _isonesf(int a);
                   1719: int _randomsf();
                   1720: int field_order_sf();
                   1721: int characteristic_sf();
                   1722: int extdeg_sf();
                   1723: void addsfum(UM p1,UM p2,UM pr);
                   1724: void subsfum(UM p1,UM p2,UM pr);
                   1725: void gcdsfum(UM p1,UM p2,UM pr);
                   1726: void mulsfum(UM p1,UM p2,UM pr);
                   1727: void mulssfum(UM p,int n,UM pr);
                   1728: void kmulsfum(UM n1,UM n2,UM nr);
                   1729: void kmulsfummain(UM n1,UM n2,UM nr);
                   1730: int divsfum(UM p1,UM p2,UM pq);
                   1731: void diffsfum(UM f,UM fd);
                   1732: void monicsfum(UM f);
                   1733: int compsfum(UM a,UM b);
                   1734: void mulsfbm(BM f1,BM f2,BM fr);
                   1735: int degbm(BM f);
                   1736: void addtosfbm(BM f,BM g);
                   1737: void eucsfum(UM f1,UM f2,UM a,UM b);
                   1738: void shiftsfum(UM f,int a,UM g);
                   1739: void shiftsflum(int n,LUM f,int ev);
                   1740: void shiftsfbm(BM f,int a);
                   1741: void clearbm(int n,BM f);
                   1742:
                   1743: void ksquareum(int mod,UM n1,UM nr);
                   1744: void extractum(UM n,int index,int len,UM nr);
                   1745: void copyum(UM n1,UM n2);
                   1746: void c_copyum(UM n,int len,int *p);
                   1747: void kmulummain(int mod,UM n1,UM n2,UM nr);
                   1748: void ksquareummain(int mod,UM n1,UM nr);
                   1749:
                   1750: void simp_ff(Obj p,Obj *rp);
                   1751: void field_order_ff(N *order);
                   1752:
                   1753: void random_lm(LM *r);
                   1754: void ntosparsen(N p,N *bits);
                   1755: void setmod_lm(N p);
                   1756: void getmod_lm(N *p);
                   1757: void simplm(LM n,LM *r);
                   1758: void qtolm(Q q,LM *l);
                   1759: void addlm(LM a,LM b,LM *c);
                   1760: void sublm(LM a,LM b,LM *c);
                   1761: void mullm(LM a,LM b,LM *c);
                   1762: void divlm(LM a,LM b,LM *c);
                   1763: void chsgnlm(LM a,LM *c);
                   1764: void pwrlm(LM a,Q b,LM *c);
                   1765: void pwrlm0(N a,N n,N *c);
                   1766: int cmplm(LM a,LM b);
                   1767: void remn_special(N,N,int,unsigned int ,N *);;
                   1768: void gen_simpn(N a,N *b);
                   1769: void gen_simpn_force(N a,N *b);
                   1770: void setmod_gfpn(P p);
                   1771: void getmod_gfpn(UP *up);
                   1772: void ptogfpn(Obj q,GFPN *l);
                   1773: void gfpntop(GFPN q,P *l);
                   1774: void simpgfpn(GFPN n,GFPN *r);
                   1775: void ntogfpn(Obj a,GFPN *b);
                   1776: void addgfpn(GFPN a,GFPN b,GFPN *c);
                   1777: void subgfpn(GFPN a,GFPN b,GFPN *c);
                   1778: void mulgfpn(GFPN a,GFPN b,GFPN *c);
                   1779: void squaregfpn(GFPN a,GFPN *c);
                   1780: void divgfpn(GFPN a,GFPN b,GFPN *c);
                   1781: void invgfpn(GFPN b,GFPN *c);
                   1782: void chsgngfpn(GFPN a,GFPN *c);
                   1783: void pwrgfpn(GFPN a,Q b,GFPN *c);
                   1784: int cmpgfpn(GFPN a,GFPN b);
                   1785: void randomgfpn(GFPN *r);
                   1786: void setmod_gfsn(UM p);
                   1787: void getmod_gfsn(UM *up);
                   1788: void simpgfsn(GFSN n,GFSN *r);
                   1789: void ntogfsn(Obj a,GFSN *b);
                   1790: void addgfsn(GFSN a,GFSN b,GFSN *c);
                   1791: void subgfsn(GFSN a,GFSN b,GFSN *c);
                   1792: void mulgfsn(GFSN a,GFSN b,GFSN *c);
                   1793: void divgfsn(GFSN a,GFSN b,GFSN *c);
                   1794: void invgfsn(GFSN b,GFSN *c);
                   1795: void chsgngfsn(GFSN a,GFSN *c);
                   1796: void pwrgfsn(GFSN a,Q b,GFSN *c);
                   1797: int cmpgfsn(GFSN a,GFSN b);
                   1798: void randomgfsn(GFSN *r);
                   1799: void setmod_gf2n(P p);
                   1800: void getmod_gf2n(UP2 *p);
                   1801: void simpgf2n(GF2N n,GF2N *r);
                   1802: void ptogf2n(Obj q,GF2N *l);
                   1803: void gf2ntop(GF2N q,P *l);
                   1804: void gf2ntovect(GF2N q,VECT *l);
                   1805: void addgf2n(GF2N a,GF2N b,GF2N *c);
                   1806: void subgf2n(GF2N a,GF2N b,GF2N *c);
                   1807: void mulgf2n(GF2N a,GF2N b,GF2N *c);
                   1808: void squaregf2n(GF2N a,GF2N *c);
                   1809: void divgf2n(GF2N a,GF2N b,GF2N *c);
                   1810: void invgf2n(GF2N b,GF2N *c);
                   1811: void chsgngf2n(GF2N a,GF2N *c);
                   1812: void pwrgf2n(GF2N a,Q b,GF2N *c);
                   1813: int cmpgf2n(GF2N a,GF2N b);
                   1814: void randomgf2n(GF2N *r);
                   1815: void binaryton(char *binary,N *np);
                   1816: void hexton(char *hex,N *np);
                   1817: void ntobn(int base,N n,N *nrp);
                   1818: void bnton(int base,N n,N *nrp);
                   1819: void ptomp(int m,P p,P *pr);
                   1820: void mptop(P f,P *gp);
                   1821: void ptosfp(P p,P *pr);
                   1822: void sfptop(P f,P *gp);
                   1823: void sf_galois_action(P p,Q e,P *pr);
                   1824: void sf_embed(P p,int k,int pm,P *pr);
                   1825: void ptolmp(P p,P *pr);
                   1826: void lmptop(P f,P *gp);
                   1827: void ptoum(int m,P f,UM wf);
                   1828: void umtop(V v,UM w,P *f);
                   1829: void ptosfum(P f,UM wf);
                   1830: void sfumtop(V v,UM w,P *f);
                   1831: void ptoup(P n,UP *nr);
                   1832: void uptop(UP n,P *nr);
                   1833: void ulmptoum(int m,UP f,UM wf);
                   1834: void objtobobj(int base,Obj p,Obj *rp);
                   1835: void bobjtoobj(int base,Obj p,Obj *rp);
                   1836: void numtobnum(int base,Num p,Num *rp);
                   1837: void bnumtonum(int base,Num p,Num *rp);
                   1838: void ptobp(int base,P p,P *rp);
                   1839: void bptop(int base,P p,P *rp);
                   1840: void listtoblist(int base,LIST p,LIST *rp);
                   1841: void blisttolist(int base,LIST p,LIST *rp);
                   1842: void vecttobvect(int base,VECT p,VECT *rp);
                   1843: void bvecttovect(int base,VECT p,VECT *rp);
                   1844: void mattobmat(int base,MAT p,MAT *rp);
                   1845: void bmattomat(int base,MAT p,MAT *rp);
                   1846: void n32ton27(N g,N *rp);
                   1847: void n27ton32(N a,N *rp);
                   1848: void mptoum(P p,UM pr);
                   1849: void umtomp(V v,UM p,P *pr);
                   1850: void enc_to_p(int p,int a,V v,P *pr);
                   1851: int comp_dum(DUM a,DUM b);
                   1852: void fctrsf(P p,DCP *dcp);
                   1853: void gensqfrsfum(UM p,struct oDUM *dc);
                   1854: void randsfum(int d,UM p);
                   1855: void pwrmodsfum(UM p,int e,UM f,UM pr);
                   1856: void spwrsfum(UM m,UM f,N e,UM r);
                   1857: void tracemodsfum(UM m,UM f,int e,UM r);
                   1858: void make_qmatsf(UM p,UM *tab,int ***mp);
                   1859: void nullsf(int **mat,int n,int *ind);
                   1860: void null_to_solsf(int **mat,int *ind,int n,UM *r);
                   1861: void czsfum(UM f,UM *r);
                   1862: int berlekampsf(UM p,int df,UM *tab,UM *r);
                   1863: void minipolysf(UM f,UM p,UM mp);
                   1864: int find_rootsf(UM p,int *root);
                   1865: void canzassf(UM f,int d,UM *r);
1.30      noro     1866: void sfhensel(int count,P f,V x,int degbound,GFS *evp,P *sfp,ML *listp);
1.29      noro     1867: int sfberle(VL vl,P f,int count,GFS *ev,DCP *dcp);
                   1868: void sfgcdgen(P f,ML blist,ML *clistp);
                   1869: void sfhenmain2(BM f,UM g0,UM h0,int dy,BM *gp);
                   1870: void ptosfbm(int dy,P f,BM fl);
                   1871: void sfbmtop(BM f,V x,V y,P *fp);
                   1872: void sfsqfr(P f,DCP *dcp);
                   1873: void sfusqfr(P f,DCP *dcp);
                   1874: void sfbsqfr(P f,V x,V y,DCP *dcp);
1.30      noro     1875: void sfbfctr(P f,V x,V y,int degbound,DCP *dcp);
1.29      noro     1876: void sfdtest(P f,ML list,V x,V y,DCP *dcp);
                   1877: int sfdtestmain(VL vl,P lcg,UM lcg0,BM lcy,P csum,ML list,
                   1878:        int k,int *in,P *fp,P *cofp);
                   1879: void const_term(P f,UM c);
                   1880: void const_term_sfbm(BM f,UM c);
                   1881: int sfctest(UM lcg0,BM lcy,ML list,int k,int *in);
                   1882: void mulsfbmarray(int dx,BM lcy,ML list,int k,int *in,V x,V y,P *g);
                   1883: void sfcsump(VL vl,P f,P *s);
                   1884: void cont_pp_sfp(VL vl,P f,P *cp,P *fp);
                   1885: int divtp_by_sfbm(VL vl,P f,P g,P *qp);
                   1886: void generate_defpoly_sfum(int n,UM *dp);
                   1887: NODE symb_merge(NODE,NODE,int);
                   1888: void _free_private_storage();
                   1889: void _DL_alloc();
                   1890: void _MP_alloc();
                   1891: void _DP_alloc();
                   1892: void _addmd_destructive(int mod,DP p1,DP p2,DP *pr);
                   1893: void _mulmd_dup(int mod,DP p1,DP p2,DP *pr);
                   1894: void _comm_mulmd_dup(int mod,DP p1,DP p2,DP *pr);
                   1895: void _weyl_mulmd_dup(int mod,DP p1,DP p2,DP *pr);
                   1896: void _mulmdm_dup(int mod,DP p,MP m0,DP *pr);
                   1897: void _weyl_mulmdm_dup(int mod,MP m0,DP p,DP *pr);
                   1898: void _weyl_mulmmm_dup(int mod,MP m0,MP m1,int n,struct cdlm *rtab,int rtablen);
                   1899: void _comm_mulmd_tab(int mod,int nv,struct cdlm *t,int n,struct cdlm *t1,int n1,struct cdlm *rt);
                   1900: void _comm_mulmd_tab_destructive(int mod,int nv,struct cdlm *t,int n,struct cdlm *t1,int n1);
                   1901: void dlto_dl(DL d,DL *dr);
                   1902: void _dltodl(DL d,DL *dr);
                   1903: void _adddl_dup(int n,DL d1,DL d2,DL *dr);
                   1904: void _free_dlarray(DL *a,int n);
                   1905: void _free_dp(DP f);
                   1906: void dpto_dp(DP p,DP *r);
                   1907: void _dptodp(DP p,DP *r);
                   1908: NODE _symb_merge(NODE m1,NODE m2,int n);
                   1909: void _addd_destructive(VL vl,DP p1,DP p2,DP *pr);
                   1910: void _muld_dup(VL vl,DP p1,DP p2,DP *pr);
                   1911: void _comm_muld_dup(VL vl,DP p1,DP p2,DP *pr);
                   1912: void _weyl_muld_dup(VL vl,DP p1,DP p2,DP *pr);
                   1913: void _muldm_dup(VL vl,DP p,MP m0,DP *pr);
                   1914: void _weyl_muldm_dup(VL vl,MP m0,DP p,DP *pr);
                   1915: void _weyl_mulmm_dup(VL vl,MP m0,MP m1,int n,struct cdl *rtab,int rtablen);
                   1916: void _comm_muld_tab(VL vl,int nv,struct cdl *t,int n,struct cdl *t1,int n1,struct cdl *rt);
                   1917: void _comm_muld_tab_destructive(VL vl,int nv,struct cdl *t,int n,struct cdl *t1,int n1);
                   1918:
                   1919: int has_fcoef(DP f);
                   1920: int has_fcoef_p(P f);
                   1921: void initd(struct order_spec *spec);
                   1922: void ptod(VL vl,VL dvl,P p,DP *pr);
                   1923: void dtop(VL vl,VL dvl,DP p,P *pr);
                   1924: void nodetod(NODE node,DP *dp);
                   1925: int sugard(MP m);
                   1926: void addd(VL vl,DP p1,DP p2,DP *pr);
                   1927: void symb_addd(DP p1,DP p2,DP *pr);
                   1928: NODE symb_merge(NODE m1,NODE m2,int n);
                   1929: DLBUCKET symb_merge_bucket(DLBUCKET m1,DLBUCKET m2,int n);
                   1930: void subd(VL vl,DP p1,DP p2,DP *pr);
                   1931: void chsgnd(DP p,DP *pr);
                   1932: void muld(VL vl,DP p1,DP p2,DP *pr);
                   1933: void comm_muld(VL vl,DP p1,DP p2,DP *pr);
                   1934: void muldm(VL vl,DP p,MP m0,DP *pr);
                   1935: void weyl_muld(VL vl,DP p1,DP p2,DP *pr);
                   1936: void weyl_muldm(VL vl,MP m0,DP p,DP *pr);
                   1937: void weyl_mulmm(VL vl,MP m0,MP m1,int n,struct cdl *rtab,int rtablen);
                   1938: void comm_muld_tab(VL vl,int nv,struct cdl *t,int n,struct cdl *t1,int n1,struct cdl *rt);
                   1939: void muldc(VL vl,DP p,P c,DP *pr);
                   1940: void divsdc(VL vl,DP p,P c,DP *pr);
                   1941: void adddl(int n,DL d1,DL d2,DL *dr);
                   1942: void adddl_destructive(int n,DL d1,DL d2);
                   1943: int compd(VL vl,DP p1,DP p2);
                   1944: int cmpdl_lex(int n,DL d1,DL d2);
                   1945: int cmpdl_revlex(int n,DL d1,DL d2);
                   1946: int cmpdl_gradlex(int n,DL d1,DL d2);
                   1947: int cmpdl_revgradlex(int n,DL d1,DL d2);
                   1948: int cmpdl_blex(int n,DL d1,DL d2);
                   1949: int cmpdl_bgradlex(int n,DL d1,DL d2);
                   1950: int cmpdl_brevgradlex(int n,DL d1,DL d2);
                   1951: int cmpdl_brevrev(int n,DL d1,DL d2);
                   1952: int cmpdl_bgradrev(int n,DL d1,DL d2);
                   1953: int cmpdl_blexrev(int n,DL d1,DL d2);
                   1954: int cmpdl_elim(int n,DL d1,DL d2);
                   1955: int cmpdl_weyl_elim(int n,DL d1,DL d2);
                   1956: int cmpdl_homo_ww_drl(int n,DL d1,DL d2);
                   1957: int cmpdl_order_pair(int n,DL d1,DL d2);
                   1958: int cmpdl_matrix(int n,DL d1,DL d2);
                   1959: void ptomd(VL vl,int mod,VL dvl,P p,DP *pr);
                   1960: void mptomd(VL vl,int mod,VL dvl,P p,DP *pr);
                   1961: void mdtop(VL vl,int mod,VL dvl,DP p,P *pr);
                   1962: void addmd(VL vl,int mod,DP p1,DP p2,DP *pr);
                   1963: void submd(VL vl,int mod,DP p1,DP p2,DP *pr);
                   1964: void chsgnmd(int mod,DP p,DP *pr);
                   1965: void mulmd(VL vl,int mod,DP p1,DP p2,DP *pr);
                   1966: void comm_mulmd(VL vl,int mod,DP p1,DP p2,DP *pr);
                   1967: void weyl_mulmd(VL vl,int mod,DP p1,DP p2,DP *pr);
                   1968: void mulmdm(VL vl,int mod,DP p,MP m0,DP *pr);
                   1969: void weyl_mulmdm(VL vl,int mod,DP p,MP m0,DP *pr);
                   1970: void weyl_mulmmm(VL vl,int mod,MP m0,MP m1,int n,DP *pr);
                   1971: void mulmdc(VL vl,int mod,DP p,P c,DP *pr);
                   1972: void divsmdc(VL vl,int mod,DP p,P c,DP *pr);
                   1973: void _dtop_mod(VL vl,VL dvl,DP p,P *pr);
                   1974: void _dp_mod(DP p,int mod,NODE subst,DP *rp);
                   1975: void _dp_monic(DP p,int mod,DP *rp);
                   1976: void _printdp(DP d);
                   1977: void addmd_destructive(int mod,DP p1,DP p2,DP *pr);
                   1978: void mulmd_dup(int mod,DP p1,DP p2,DP *pr);
                   1979: void comm_mulmd_dup(int mod,DP p1,DP p2,DP *pr);
                   1980: void weyl_mulmd_dup(int mod,DP p1,DP p2,DP *pr);
                   1981: void mulmdm_dup(int mod,DP p,MP m0,DP *pr);
                   1982: void weyl_mulmdm_dup(int mod,MP m0,DP p,DP *pr);
                   1983: void weyl_mulmmm_dup(int mod,MP m0,MP m1,int n,struct cdlm *rtab,int rtablen);
                   1984: void comm_mulmd_tab_destructive(int mod,int nv,struct cdlm *t,int n,struct cdlm *t1,int n1);
                   1985: void adddl_dup(int n,DL d1,DL d2,DL *dr);
                   1986: void monicup(UP a,UP *b);
                   1987: void simpup(UP a,UP *b);
                   1988: void simpnum(Num a,Num *b);
                   1989: void uremp(P p1,P p2,P *rp);
                   1990: void ugcdp(P p1,P p2,P *rp);
                   1991: void reversep(P p1,Q d,P *rp);
                   1992: void invmodp(P p1,Q d,P *rp);
                   1993: void addup(UP n1,UP n2,UP *nr);
                   1994: void subup(UP n1,UP n2,UP *nr);
                   1995: void chsgnup(UP n1,UP *nr);
                   1996: void hybrid_mulup(int ff,UP n1,UP n2,UP *nr);
                   1997: void hybrid_squareup(int ff,UP n1,UP *nr);
                   1998: void hybrid_tmulup(int ff,UP n1,UP n2,int d,UP *nr);
                   1999: void mulup(UP n1,UP n2,UP *nr);
                   2000: void mulcup(Num c,UP n1,UP *nr);
                   2001: void tmulup(UP n1,UP n2,int d,UP *nr);
                   2002: void squareup(UP n1,UP *nr);
                   2003: void remup(UP n1,UP n2,UP *nr);
                   2004: void remup_destructive(UP n1,UP n2);
                   2005: void qrup(UP n1,UP n2,UP *nq,UP *nr);
                   2006: void qrup_destructive(UP n1,UP n2);
                   2007: void gcdup(UP n1,UP n2,UP *nr);
                   2008: void extended_gcdup(UP a,UP m,UP *r);
                   2009: void reverseup(UP n1,int d,UP *nr);
                   2010: void invmodup(UP n1,int d,UP *nr);
                   2011: void pwrup(UP n,Q e,UP *nr);
                   2012: int compup(UP n1,UP n2);
                   2013: void kmulp(VL vl,P n1,P n2,P *nr);
                   2014: void ksquarep(VL vl,P n1,P *nr);
                   2015: void kmulup(UP n1,UP n2,UP *nr);
                   2016: void ksquareup(UP n1,UP *nr);
                   2017: void copyup(UP n1,UP n2);
                   2018: void c_copyup(UP n,int len,pointer *p);
                   2019: void kmulupmain(UP n1,UP n2,UP *nr);
                   2020: void ksquareupmain(UP n1,UP *nr);
                   2021: void rembymulup(UP n1,UP n2,UP *nr);
                   2022: void hybrid_rembymulup_special(int ff,UP n1,UP n2,UP inv2,UP *nr);
                   2023: void rembymulup_special(UP n1,UP n2,UP inv2,UP *nr);
                   2024: void tkmulup(UP n1,UP n2,int d,UP *nr);
                   2025: void shiftup(UP n,int d,UP *nr);
                   2026: void fft_rembymulup_special(UP n1,UP n2,UP inv2,UP *nr);
                   2027: void set_degreeup(UP n,int d);
                   2028: void decompup(UP n,int d,UP *n0,UP *n1);
                   2029: void truncup(UP n1,int d,UP *nr);
                   2030: int int_bits(int t);
                   2031: int maxblenup(UP n);
                   2032: void uptofmarray(int mod,UP n,ModNum *f);
                   2033: void fmarraytoup(ModNum *f,int d,UP *nr);
                   2034: void uiarraytoup(unsigned int **f,int n,int d,UP *nr);
                   2035: void adj_coefup(UP n,N m,N m2,UP *nr);
                   2036: void remcup(UP n,N mod,UP *nr);
                   2037: void fft_mulup(UP n1,UP n2,UP *nr);
                   2038: void trunc_fft_mulup(UP n1,UP n2,int dbd,UP *nr);
                   2039: void fft_squareup(UP n1,UP *nr);
                   2040: void fft_mulup_main(UP n1,UP n2,int dbd,UP *nr);
                   2041: void crup(ModNum **f,int d,int *mod,int index,N m,UP *r);
                   2042: void fft_mulup_specialmod_main(UP n1,UP n2,int dbd,int *modind,int nmod,UP *nr);
                   2043: void divn(N n1,N n2,N *nq,N *nr);
                   2044: void divsn(N n1,N n2,N *nq);
                   2045: void remn(N n1,N n2,N *nr);
                   2046: void remn_special(N a,N d,int bits,unsigned int lower,N *b);
                   2047: void mulin(N n,unsigned int d,unsigned int *p);
                   2048: unsigned int divin(N n,unsigned int dvr,N *q);
                   2049: void bprintn(N n);
                   2050: void bxprintn(N n);
                   2051: void muln(N n1,N n2,N *nr);
                   2052: void _muln(N n1,N n2,N nr);
                   2053: void muln_1(unsigned int *p,int s,unsigned int d,unsigned int *r);
                   2054: void divnmain(int d1,int d2,unsigned int *m1,unsigned int *m2,unsigned int *q);
                   2055: void divnmain_special(int d1,int d2,unsigned int *m1,unsigned int *m2,unsigned int *q);
                   2056: unsigned int divn_1(unsigned int *p,int s,unsigned int d,unsigned int *r);
                   2057: void addn(N n1,N n2,N *nr);
                   2058: int subn(N n1,N n2,N *nr);
                   2059: void _addn(N n1,N n2,N nr);
                   2060: int _subn(N n1,N n2,N nr);
                   2061: void addarray_to(unsigned int *a1,int n1,unsigned int *a2,int n2);
                   2062: void pwrn(N n,int e,N *nr);
                   2063: void gcdn(N n1,N n2,N *nr);
                   2064: void gcdEuclidn(N n1,N n2,N *nr);
                   2065: int cmpn(N n1,N n2);
                   2066: void bshiftn(N n,int b,N *r);
                   2067: void shiftn(N n,int w,N *r);
                   2068: void randomn(int bits,N *r);
                   2069: void freen(N n);
                   2070: int n_bits(N n);
                   2071: void fft_mulup_lm(UP n1,UP n2,UP *nr);
                   2072: void fft_squareup_lm(UP n1,UP *nr);
                   2073: void trunc_fft_mulup_lm(UP n1,UP n2,int dbd,UP *nr);
                   2074: void crup_lm(ModNum **f,int d,int *mod,int index,N m,N lm_mod,UP *r);
                   2075: void fft_rembymulup_special_lm(UP n1,UP n2,UP inv2,UP *nr);
                   2076: void uptolmup(UP n,UP *nr);
                   2077: void save_up(UP obj,char *name);
                   2078: void hybrid_powermodup(UP f,UP *xp);
                   2079: void powermodup(UP f,UP *xp);
                   2080: void hybrid_generic_powermodup(UP g,UP f,Q d,UP *xp);
                   2081: void generic_powermodup(UP g,UP f,Q d,UP *xp);
                   2082: void hybrid_powertabup(UP f,UP xp,UP *tab);
                   2083: void powertabup(UP f,UP xp,UP *tab);
                   2084: void squarep_gf2n(VL vl,P n1,P *nr);
                   2085: void squareup_gf2n(UP n1,UP *nr);
                   2086: void powermodup_gf2n(UP f,UP *xp);
                   2087: void generic_powermodup_gf2n(UP g,UP f,Q d,UP *xp);
                   2088: void tracemodup_gf2n(UP g,UP f,Q d,UP *xp);
                   2089: void tracemodup_gf2n_slow(UP g,UP f,Q d,UP *xp);
                   2090: void tracemodup_gf2n_tab(UP g,UP f,Q d,UP *xp);
                   2091: void square_rem_tab_up_gf2n(UP f,UP *tab,UP *rp);
                   2092: void powertabup_gf2n(UP f,UP xp,UP *tab);
                   2093: void find_root_gf2n(UP f,GF2N *r);
                   2094: void ptoup2(P n,UP2 *nr);
                   2095: void ptoup2_sparse(P n,UP2 *nr);
                   2096: void up2top(UP2 n,P *nr);
                   2097: void up2tovect(UP2 n,VECT *nr);
                   2098: void up2ton(UP2 p,Q *n);
                   2099: void ntoup2(Q n,UP2 *p);
                   2100: void gen_simpup2(UP2 p,GEN_UP2 m,UP2 *r);
                   2101: void gen_simpup2_destructive(UP2 p,GEN_UP2 m);
                   2102: void gen_invup2(UP2 p,GEN_UP2 m,UP2 *r);
                   2103: void gen_pwrmodup2(UP2 a,Q b,GEN_UP2 m,UP2 *c);
                   2104: void simpup2(UP2 p,UP2 m,UP2 *r);
                   2105: int degup2(UP2 a);
                   2106: int degup2_sparse(UP2 a);
                   2107: int degup2_1(unsigned int a);
                   2108: void addup2(UP2 a,UP2 b,UP2 *c);
                   2109: void subup2(UP2 a,UP2 b,UP2 *c);
                   2110: void _mulup2_1(UP2 a,unsigned int b,UP2 c);
                   2111: void _mulup2_h(UP2 a,unsigned int b,UP2 c);
                   2112: void mulup2(UP2 a,UP2 b,UP2 *c);
                   2113: void _kmulup2_(unsigned int *a,unsigned int *b,int w,unsigned int *c);
                   2114: void _mulup2_nn(unsigned int *a,unsigned int *b,int w,unsigned int *c);
                   2115: void _mulup2(UP2 a,UP2 b,UP2 c);
                   2116: void _mulup2_(_UP2 a,_UP2 b,_UP2 c);
                   2117: void squareup2(UP2 n,UP2 *nr);
                   2118: void _squareup2(UP2 n,UP2 nr);
                   2119: void _adjup2(UP2 n);
                   2120: void _adjup2_(_UP2 n);
                   2121: void _addup2(UP2 a,UP2 b,UP2 c);
                   2122: void _addup2_destructive(UP2 a,UP2 b);
                   2123: void _addup2_(_UP2 a,_UP2 b,_UP2 c);
                   2124: void _addtoup2_(_UP2 a,_UP2 b);
                   2125: unsigned int mulup2_bb(unsigned int a,unsigned int b);
                   2126: void init_up2_tab();
                   2127: void divup2_1(unsigned int a1,unsigned int a2,int e1,int e2,unsigned int *qp,unsigned int *rp);
                   2128: void qrup2(UP2 a,UP2 b,UP2 *q,UP2 *r);
                   2129: void _qrup2(UP2 a,UP2 b,UP2 q,UP2 r);
                   2130: void remup2(UP2 a,UP2 b,UP2 *c);
                   2131: void _remup2(UP2 a,UP2 b,UP2 c);
                   2132: void remup2_sparse(UP2 a,UP2 b,UP2 *c);
                   2133: void remup2_sparse_destructive(UP2 a,UP2 b);
                   2134: void remup2_type1_destructive(UP2 a,int d);
                   2135: void remup2_3_destructive(UP2 a,UP2 b);
                   2136: void remup2_5_destructive(UP2 a,UP2 b);
                   2137: void _invup2_1(unsigned int f1,unsigned int f2,unsigned int *a1,unsigned int *b1);
                   2138: void _gcdup2_1(unsigned int f1,unsigned int f2,unsigned int *gcd);
                   2139: void up2_init_eg();
                   2140: void up2_show_eg();
                   2141: void invup2(UP2 a,UP2 m,UP2 *inv);
                   2142: void gcdup2(UP2 a,UP2 m,UP2 *gcd);
                   2143: void chsgnup2(UP2 a,UP2 *c);
                   2144: void pwrmodup2(UP2 a,Q b,UP2 m,UP2 *c);
                   2145: void pwrmodup2_sparse(UP2 a,Q b,UP2 m,UP2 *c);
                   2146: int compup2(UP2 n1,UP2 n2);
                   2147: void _copyup2(UP2 n,UP2 r);
                   2148: void _bshiftup2(UP2 n,int b,UP2 r);
                   2149: void _bshiftup2_destructive(UP2 n,int b);
                   2150: void diffup2(UP2 f,UP2 *r);
                   2151: int sqfrcheckup2(UP2 f);
                   2152: int irredcheckup2(UP2 f);
                   2153: int irredcheck_dddup2(UP2 f);
                   2154: void _copy_up2bits(UP2 p,unsigned int **mat,int pos);
                   2155: int compute_multiplication_matrix(P p0,GF2MAT *mp);
                   2156: void compute_change_of_basis_matrix(P p0,P p1,int to,GF2MAT *m01,GF2MAT *m10);
                   2157: void compute_change_of_basis_matrix_with_root(P p0,P p1,int to,GF2N root,GF2MAT *m01,GF2MAT *m10);
                   2158: int compute_representation_conversion_matrix(P p0,GF2MAT *np,GF2MAT *pn);
                   2159: void mul_nb(GF2MAT mat,unsigned int *a,unsigned int *b,unsigned int *c);
                   2160: void leftshift(unsigned int *a,int n);
                   2161: void mat_to_gf2mat(MAT a,unsigned int ***b);
                   2162: void gf2mat_to_mat(unsigned int **a,int n,MAT *b);
                   2163: void mulgf2mat(int n,unsigned int **a,unsigned int **b,unsigned int **c);
                   2164: void mulgf2vectmat(int n,unsigned int *a,unsigned int **b,unsigned int *c);
                   2165: int mulgf2vectvect(int n,unsigned int *a,unsigned int *b);
                   2166: int invgf2mat(int n,unsigned int **a,unsigned int **b);
                   2167: void _mulup2_22(unsigned int *a1,unsigned int *a2,unsigned int *ar);
                   2168: void _mulup2_33(unsigned int *a1,unsigned int *a2,unsigned int *ar);
                   2169: void _mulup2_44(unsigned int *a1,unsigned int *a2,unsigned int *ar);
                   2170: void _mulup2_55(unsigned int *a1,unsigned int *a2,unsigned int *ar);
                   2171: void _mulup2_66(unsigned int *a1,unsigned int *a2,unsigned int *ar);
                   2172: void type1_bin_invup2(UP2 a,int n,UP2 *inv);
                   2173: UP2 *compute_tab_gf2n(UP2 f);
                   2174: UP compute_trace_gf2n(UP2 *tab,GF2N c,int n);
                   2175: void up2toup(UP2 f,UP *r);
                   2176: void find_root_up2(UP2 f,GF2N *r);
                   2177: void addq(Q n1,Q n2,Q *nr);
                   2178: void subq(Q n1,Q n2,Q *nr);
                   2179: void mulq(Q n1,Q n2,Q *nr);
                   2180: void divq(Q n1,Q n2,Q *nq);
                   2181: void divsq(Q n1,Q n2,Q *nq);
                   2182: void invq(Q n,Q *nr);
                   2183: void chsgnq(Q n,Q *nr);
                   2184: void pwrq(Q n1,Q n,Q *nr);
                   2185: int cmpq(Q q1,Q q2);
                   2186: void remq(Q n,Q m,Q *nr);
                   2187: void mkbc(int n,Q *t);
                   2188: void mkwc(int k,int l,Q *t);
                   2189: void mkwcm(int k,int l,int m,int *t);
                   2190: void factorial(int n,Q *r);
                   2191: void invl(Q a,Q mod,Q *ar);
                   2192: void kmuln(N n1,N n2,N *nr);
                   2193: void extractn(N n,int index,int len,N *nr);
                   2194: void copyn(N n,int len,int *p);
                   2195: void dupn(N n,N p);
                   2196: void kmulnmain(N n1,N n2,N *nr);
                   2197: void plisttop(P *f,V v,int n,P *gp);
                   2198: int divtp(VL vl,P p1,P p2,P *q);
                   2199: int divtdcp(VL vl,P p1,P p2,P *q);
                   2200: int divtpz(VL vl,P p1,P p2,P *q);
                   2201: int divtdcpz(VL vl,P p1,P p2,P *q);
                   2202: void udivpz(P f1,P f2,P *fqp,P *frp);
                   2203: void udivpwm(Q mod,P p1,P p2,P *q,P *r);
                   2204: void udivpzwm(Q mod,P f1,P f2,P *fqp,P *frp);
                   2205: 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);
                   2206: 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);
                   2207: 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);
                   2208: void henzq1(P g,P h,Q bound,P *gcp,P *hcp,Q *qp);
                   2209: void addm2p(VL vl,Q mod,Q mod2,P n1,P n2,P *nr);
                   2210: void subm2p(VL vl,Q mod,Q mod2,P n1,P n2,P *nr);
                   2211: void mulm2p(VL vl,Q mod,Q mod2,P n1,P n2,P *nr);
                   2212: void cmp(Q mod,P p,P *pr);
                   2213: void cm2p(Q mod,Q m,P p,P *pr);
                   2214: void addm2q(Q mod,Q mod2,Q n1,Q n2,Q *nr);
                   2215: void subm2q(Q mod,Q mod2,Q n1,Q n2,Q *nr);
                   2216: void mulm2q(Q mod,Q mod2,Q n1,Q n2,Q *nr);
                   2217: void rem2q(Q n,Q m,Q m2,Q *nr);
                   2218: void exthpc_generic(VL vl,P p,int d,V v,P *pr);
                   2219: void exthp(VL vl,P p,int d,P *pr);
                   2220: void exthpc(VL vl,V v,P p,int d,P *pr);
                   2221: void cbound(VL vl,P p,Q *b);
                   2222: int geldb(VL vl,P p);
                   2223: int getdeg(V v,P p);
                   2224: void cmax(P p,Q *b);
                   2225: int nextbin(VN vn,int n);
                   2226: void mulsgn(VN vn,VN vnt,int n,VN vn1);
                   2227: void next(VN vn);
                   2228: void clctv(VL vl,P p,VL *nvlp);
                   2229: void markv(VN vn,int n,P p);
                   2230: void vntovl(VN vn,int n,VL *vlp);
                   2231: int dbound(V v,P f);
                   2232: int homdeg(P f);
                   2233: int minhomdeg(P f);
                   2234: void adjc(VL vl,P f,P a,P lc0,Q q,P *fr,P *ar);
                   2235: void affinemain(VL vl,P p,V v0,int n,P *pl,P *pr);
                   2236: void restore(VL vl,P f,VN vn,P *fr);
                   2237: void mergev(VL vl,VL vl1,VL vl2,VL *nvlp);
                   2238: void substvp(VL vl,P f,VN vn,P *g);
                   2239: void affine(VL vl,P f,VN vn,P *fr);
                   2240: void addnum(VL vl,Num a,Num b,Num *c);
                   2241: void subnum(VL vl,Num a,Num b,Num *c);
                   2242: void mulnum(VL vl,Num a,Num b,Num *c);
                   2243: void divnum(VL vl,Num a,Num b,Num *c);
                   2244: void pwrnum(VL vl,Num a,Num b,Num *c);
                   2245: void chsgnnum(Num a,Num *c);
                   2246: int compnum(VL vl,Num a,Num b);
                   2247: void one_ff(Num *c);
                   2248: int negative_number(Num c);
                   2249: void simp_ff(Obj p,Obj *rp);
                   2250: void field_order_ff(N *order);
                   2251: int fft_available(int d1,int n1,int d2,int n2);
                   2252: void get_fft_prime(int index,int *p,int *d);
                   2253: void nglob_init();
                   2254: void get_eg(struct oEGT *p);
                   2255: void init_eg(struct oEGT *eg);
                   2256: void add_eg(struct oEGT *base,struct oEGT *start,struct oEGT *end);
                   2257: void print_eg(char *item,struct oEGT *eg);
                   2258: void print_split_eg(struct oEGT *start,struct oEGT *end);
                   2259: void print_split_e(struct oEGT *start,struct oEGT *end);
                   2260: void suspend_timer() ;
                   2261: void resume_timer() ;
                   2262: void reset_engine() ;
                   2263: unsigned int get_asir_version() ;
                   2264: char *get_asir_distribution();
                   2265: void create_error(ERR *err,unsigned int serial,char *msg);
                   2266: void init_lprime();
                   2267: int get_lprime(int index);
                   2268: void create_new_lprimes(int index);
                   2269: void reorderp(VL nvl,VL ovl,P p,P *pr);
                   2270: void substp(VL vl,P p,V v0,P p0,P *pr);
                   2271: void detp(VL vl,P **rmat,int n,P *dp);
                   2272: void invmatp(VL vl,P **rmat,int n,P ***imatp,P *dnp);
                   2273: void reordvar(VL vl,V v,VL *nvlp);
                   2274: void gcdprsp(VL vl,P p1,P p2,P *pr);
                   2275: void gcdcp(VL vl,P p,P *pr);
                   2276: void sprs(VL vl,V v,P p1,P p2,P *pr);
                   2277: void resultp(VL vl,V v,P p1,P p2,P *pr);
                   2278: void srch2(VL vl,V v,P p1,P p2,P *pr);
                   2279: void srcr(VL vl,V v,P p1,P p2,P *pr);
                   2280: void res_ch_det(VL vl,V v,P p1,P p2,P *pr);
                   2281: void res_detmp(VL vl,int mod,V v,P p1,P p2,P *dp);
                   2282: void premp(VL vl,P p1,P p2,P *pr);
                   2283: void ptozp0(P p,P *pr);
                   2284: void mindegp(VL vl,P p,VL *mvlp,P *pr);
                   2285: void maxdegp(VL vl,P p,VL *mvlp,P *pr);
                   2286: void min_common_vars_in_coefp(VL vl,P p,VL *mvlp,P *pr);
                   2287: void minlcdegp(VL vl,P p,VL *mvlp,P *pr);
                   2288: void sort_by_deg(int n,P *p,P *pr);
                   2289: void sort_by_deg_rev(int n,P *p,P *pr);
                   2290: void getmindeg(V v,P p,Q *dp);
                   2291: void minchdegp(VL vl,P p,VL *mvlp,P *pr);
                   2292: int getchomdeg(V v,P p);
                   2293: int getlchomdeg(V v,P p,int *d);
                   2294: int nmonop(P p);
                   2295: int qpcheck(Obj p);
                   2296: int uzpcheck(Obj p);
                   2297: int p_mag(P p);
                   2298: int maxblenp(P p);
                   2299: void berle(int index,int count,P f,ML *listp);
                   2300: int berlecnt(int mod,UM f);
                   2301: int berlecntmain(int mod,int n,int m,int **c);
                   2302: UM *berlemain(int mod,UM f,UM *fp);
                   2303: void hensel(int index,int count,P f,ML *listp);
                   2304: void hensel2(int index,int count,P f,ML *listp);
                   2305: void henmain2(LUM f,UM g0,UM h0,UM a0,UM b0,int m,int bound,LUM *gp);
                   2306: void clearlum(int n,int bound,LUM f);
                   2307: void addtolum(int m,int bound,LUM f,LUM g);
                   2308: void hsq(int index,int count,P f,int *nindex,DCP *dcp);
                   2309: void gcdgen(P f,ML blist,ML *clistp);
                   2310: void henprep2(int mod,int q,int k,UM f,UM g,UM h,UM qg,UM qh,UM qa,UM qb);
                   2311: void henprep(P f,ML blist,ML clist,ML *bqlistp,ML *cqlistp);
                   2312: void henmain(LUM f,ML bqlist,ML cqlist,ML *listp);
                   2313: int mignotte(int q,P f);
                   2314: int mig(int q,int d,P f);
                   2315: void sqad(unsigned int man,int exp);
                   2316: void ptolum(int q,int bound,P f,LUM fl);
                   2317: void modfctrp(P p,int mod,int flag,DCP *dcp);
                   2318: void gensqfrum(int mod,UM p,struct oDUM *dc);
                   2319: void ddd(int mod,UM f,UM *r);
                   2320: void canzas(int mod,UM f,int d,UM *base,UM *r);
                   2321: void randum(int mod,int d,UM p);
                   2322: void pwrmodum(int mod,UM p,int e,UM f,UM pr);
                   2323: void spwrum(int mod,UM m,UM *base,UM f,N e,UM r);
                   2324: void spwrum0(int mod,UM m,UM f,N e,UM r);
                   2325: void mult_mod_tab(UM p,int mod,UM *tab,UM r,int d);
                   2326: void make_qmat(UM p,int mod,UM *tab,int ***mp);
                   2327: void null_mod(int **mat,int mod,int n,int *ind);
                   2328: void null_to_sol(int **mat,int *ind,int mod,int n,UM *r);
                   2329: void newddd(int mod,UM f,UM *r);
                   2330: int nfctr_mod(UM f,int mod);
                   2331: int irred_check(UM f,int mod);
                   2332: int berlekamp(UM p,int mod,int df,UM *tab,UM *r);
                   2333: void minipoly_mod(int mod,UM f,UM p,UM mp);
                   2334: void lnf_mod(int mod,int n,UM p0,UM p1,struct p_pair *list,UM np0,UM np1);
                   2335: void showum(UM p);
                   2336: void showumat(int **mat,int n);
                   2337: int find_root(int mod,UM p,int *root);
                   2338: void fctrp(VL vl,P f,DCP *dcp);
                   2339: void fctr_wrt_v_p(VL vl,P f,V v,DCP *dcp);
                   2340: void homfctr(VL vl,P g,DCP *dcp);
                   2341: void mfctr(VL vl,P f,DCP *dcp);
                   2342: void mfctr_wrt_v(VL vl,P f,V v,DCP *dcp);
                   2343: void adjsgn(P p,DCP dc);
                   2344: int headsgn(P p);
                   2345: void fctrwithmvp(VL vl,P f,V v,DCP *dcp);
                   2346: void mfctrwithmv(VL vl,P f,V v,DCP *dcp);
                   2347: void ufctr(P f,int hint,DCP *dcp);
                   2348: void mfctrmain(VL vl,P p,DCP *dcp);
                   2349: void ufctrmain(P p,int hint,DCP *dcp);
                   2350: void cycm(V v,int n,DCP *dcp);
                   2351: void cycp(V v,int n,DCP *dcp);
                   2352: void calcphi(V v,int n,struct oMF *mfp);
                   2353: void mkssum(V v,int e,int s,int sgn,P *r);
                   2354: int iscycp(P f);
                   2355: int iscycm(P f);
                   2356: void sortfs(DCP *dcp);
                   2357: void sortfsrev(DCP *dcp);
                   2358: void nthrootchk(P f,struct oDUM *dc,ML fp,DCP *dcp);
                   2359: void sqfrp(VL vl,P f,DCP *dcp);
                   2360: void msqfr(VL vl,P f,DCP *dcp);
                   2361: void usqp(P f,DCP *dcp);
                   2362: void msqfrmain(VL vl,P p,DCP *dcp);
                   2363: void msqfrmainmain(VL vl,P p,VN vn,P p0,DCP dc0,DCP *dcp,P *pp);
                   2364: void mfctrhen2(VL vl,VN vn,P f,P f0,P g0,P h0,P lcg,P lch,P *gp);
                   2365: int sqfrchk(P p);
                   2366: int cycchk(P p);
                   2367: int zerovpchk(VL vl,P p,VN vn);
                   2368: int valideval(VL vl,DCP dc,VN vn);
                   2369: void estimatelc(VL vl,Q c,DCP dc,VN vn,P *lcp);
                   2370: void monomialfctr(VL vl,P p,P *pr,DCP *dcp);
                   2371: void afctr(VL vl,P p0,P p,DCP *dcp);
                   2372: void afctrmain(VL vl,P p0,P p,int init,DCP *dcp);
                   2373: int divtmp(VL vl,int mod,P p1,P p2,P *q);
                   2374: int divtdcmp(VL vl,int mod,P p1,P p2,P *q);
                   2375: void GC_gcollect();
1.1       noro     2376:
                   2377: #if 0 && !defined(VISUAL)
                   2378: void bzero(const void *,int);
                   2379: void bcopy(const void *,void *,int);
                   2380: char *index(char *,int);
                   2381: #endif

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