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

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

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