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

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

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