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