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

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

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