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

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

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