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

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

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