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