Annotation of OpenXM_contrib2/asir2000/include/ca.h, Revision 1.25
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.25 ! noro 48: * $OpenXM: OpenXM_contrib2/asir2000/include/ca.h,v 1.24 2001/09/11 01:30:32 noro Exp $
1.4 noro 49: */
1.1 noro 50: #include <stdio.h>
51:
52: #if defined(hpux)
53: #include <netinet/in.h>
54: # define setbuffer(FP,buf,siz) setvbuf(FP,buf,_IOFBF,siz)
55: #endif
56:
57: #if defined(VISUAL)
58: #include <stdlib.h>
59: #endif
60:
61: #if defined(linux) || (defined(sun) && !defined(SYSV)) || defined(news5000) || (defined(mips) && defined(ultrix))
62: #include <alloca.h>
63: #endif
64:
65: #if (defined(sun) && defined(SYSV))
66: #define alloca(x) __builtin_alloca(x)
67: #endif
68:
69: #if defined(VISUAL)
70: #include <malloc.h>
71: #endif
72:
73: #if 0
74: #include <sys/types.h>
75: typedef caddr_t pointer;
76: #endif
77:
78: typedef void * pointer;
79:
80: #if defined(VISUAL)
81: #include <string.h>
82: #define index(s,c) strchr(s,c)
83: #define bzero(s,len) memset(s,0,len)
84: #define bcopy(x,y,len) memcpy(y,x,len)
85: #endif
86:
87: #define COPY(a,b) ((b)=(a))
88: #define FREEN(p)
89: #define FREEQ(p)
90: #define FREE(p)
91: #define INITRC(p)
92:
93: /* data structures */
94:
95: #define O_N 1
96: #define O_P 2
97: #define O_R 3
98: #define O_LIST 4
99: #define O_VECT 5
100: #define O_MAT 6
101: #define O_STR 7
102: #define O_COMP 8
103: #define O_DP 9
104: #define O_USINT 10
105: #define O_ERR 11
106: #define O_GF2MAT 12
107: #define O_MATHCAP 13
108: #define O_F 14
109: #define O_GFMMAT 15
1.6 noro 110: #define O_BYTEARRAY 16
1.13 noro 111: #define O_QUOTE 17
1.1 noro 112: #define O_VOID -1
113:
114: #define N_Q 0
115: #define N_R 1
116: #define N_A 2
117: #define N_B 3
118: #define N_C 4
119: #define N_M 5
120: #define N_LM 6
121: #define N_GF2N 7
122: #define N_GFPN 8
1.12 noro 123: #define N_GFS 9
1.21 noro 124: #define N_GFSN 10
1.1 noro 125:
126: #define ORD_REVGRADLEX 0
127: #define ORD_GRADLEX 1
128: #define ORD_LEX 2
129:
130: #if LONG_IS_32BIT
131: #if defined(VISUAL)
132: typedef _int64 L;
133: typedef unsigned _int64 UL;
134: #else
135: typedef long long L;
136: typedef unsigned long long UL;
137: #endif
138: #else
139: typedef long L;
140: typedef unsigned long UL;
141: #endif
142:
143: typedef struct oN {
144: int p;
145: unsigned int b[1];
146: } *N;
147:
148: typedef struct oUP2 {
149: int w;
150: unsigned int b[1];
151: } *UP2;
152:
153: typedef struct _oUP2 {
154: int w;
155: unsigned int *b;
156: } *_UP2;
157:
158: #define UP2_DENSE 0
159: #define UP2_SPARSE 1
160:
161: typedef struct oGEN_UP2 {
162: int id;
163: UP2 dense;
164: UP2 sparse;
165: } *GEN_UP2;
166:
167: typedef struct oV {
168: char *name;
169: pointer attr;
170: pointer priv;
171: } *V;
172:
173: typedef struct oQ {
174: short id;
175: char nid;
176: char sgn;
177: N nm;
178: N dn;
179: } *Q;
180:
181: typedef struct oReal {
182: short id;
183: char nid;
184: char pad;
185: double body;
186: } *Real;
187:
188: typedef struct oAlg {
189: short id;
190: char nid;
191: char pad;
192: struct oObj *body;
193: } *Alg;
194:
195: typedef struct oBF {
196: short id;
197: char nid;
198: char pad;
199: long body[1];
200: } *BF;
201:
202: typedef struct oC {
203: short id;
204: char nid;
205: char pad;
206: struct oNum *r,*i;
207: } *C;
208:
209: typedef struct oLM {
210: short id;
211: char nid;
212: char pad;
213: struct oN *body;
214: } *LM;
215:
216: typedef struct oGF2N {
217: short id;
218: char nid;
219: char pad;
220: struct oUP2 *body;
221: } *GF2N;
222:
223: typedef struct oGFPN {
224: short id;
225: char nid;
226: char pad;
227: struct oUP *body;
228: } *GFPN;
229:
230: typedef struct oNum {
231: short id;
232: char nid;
233: char pad;
234: } *Num;
235:
236: typedef struct oMQ {
237: short id;
238: char nid;
239: char pad;
240: int cont;
241: } *MQ;
242:
1.12 noro 243: typedef struct oGFS {
244: short id;
245: char nid;
246: char pad;
247: int cont;
248: } *GFS;
249:
1.21 noro 250: typedef struct oGFSN {
1.20 noro 251: short id;
252: char nid;
253: char pad;
254: struct oUM *body;
1.21 noro 255: } *GFSN;
1.12 noro 256:
1.1 noro 257: typedef struct oP {
258: short id;
259: short pad;
260: V v;
261: struct oDCP *dc;
262: } *P;
263:
264: typedef struct oR {
265: short id;
266: short reduced;
267: P nm;
268: P dn;
269: } *R;
270:
271: typedef struct oVECT {
272: short id;
273: short pad;
274: int len;
275: pointer *body;
276: } *VECT;
277:
278: typedef struct oMAT {
279: short id;
280: short pad;
281: int row,col;
282: pointer **body;
283: } *MAT;
284:
285: typedef struct oGF2MAT {
286: short id;
287: short pad;
288: int row,col;
289: unsigned int **body;
290: } *GF2MAT, *GFMMAT;
291:
292: typedef struct oLIST {
293: short id;
294: short pad;
295: struct oNODE *body;
296: } *LIST;
297:
298: typedef struct oSTRING {
299: short id;
300: short pad;
301: char *body;
302: } *STRING;
303:
304: typedef struct oCOMP {
305: short id;
306: short type;
307: struct oObj *member[1];
308: } *COMP;
309:
310: typedef struct oDP {
311: short id;
312: short nv;
313: int sugar;
314: struct oMP *body;
315: } *DP;
316:
317: typedef struct oUSINT {
318: short id;
319: short pad;
320: unsigned body;
321: } *USINT;
322:
323: typedef struct oERR {
324: short id;
325: short pad;
326: struct oObj *body;
327: } *ERR;
328:
329: typedef struct oMATHCAP {
330: short id;
331: short pad;
332: struct oLIST *body;
333: } *MATHCAP;
334:
1.6 noro 335: typedef struct oBYTEARRAY {
336: short id;
337: short pad;
338: int len;
339: unsigned char *body;
340: } *BYTEARRAY;
341:
1.13 noro 342: typedef struct oQUOTE {
343: short id;
344: short pad;
345: pointer body;
346: } *QUOTE;
347:
1.1 noro 348: typedef struct oObj {
349: short id;
350: short pad;
351: } *Obj;
352:
353: typedef struct oDCP {
354: Q d;
355: P c;
356: struct oDCP *next;
357: } *DCP;
358:
359: typedef struct oMP {
360: struct oDL *dl;
361: P c;
362: struct oMP *next;
363: } *MP;
364:
365: typedef struct oDL {
366: int td;
367: int d[1];
368: } *DL;
1.23 noro 369:
370: /*
371: * compressed DP
372: */
373:
374: typedef struct oCDP {
375: int len;
1.24 noro 376: struct oCM *body;
1.23 noro 377: } *CDP;
378:
1.24 noro 379: typedef struct oCM {
1.23 noro 380: int index;
381: int c;
1.24 noro 382: } *CM;
1.1 noro 383:
1.25 ! noro 384: /* bucket list for DL */
! 385:
! 386: typedef struct oDLBUCKET {
! 387: int td;
! 388: struct oNODE *body;
! 389: struct oDLBUCKET *next;
! 390: } *DLBUCKET;
! 391:
1.1 noro 392: typedef struct oVL {
393: V v;
394: struct oVL *next;
395: } *VL;
396:
397: typedef struct oNODE {
398: pointer body;
399: struct oNODE *next;
400: } *NODE;
401:
1.16 noro 402: /* univariate poly over small finite field; dense */
1.1 noro 403: typedef struct oUM {
404: int d;
405: int c[1];
406: } *UM;
407:
1.16 noro 408: /* univariate poly with padic coeff */
1.1 noro 409: typedef struct oLUM {
410: int d;
411: int *c[1];
412: } *LUM;
413:
1.16 noro 414: /* bivariate poly over small finite field; dense */
415:
416: typedef struct oBM {
417: int d;
418: UM c[1];
419: } *BM;
420:
1.1 noro 421: typedef struct oML {
422: int n;
423: int mod;
424: int bound;
425: pointer c[1];
426: } *ML;
427:
428: typedef struct oUB {
429: int d;
430: N c[1];
431: } *UB;
432:
433: typedef struct oVN {
434: V v;
435: int n;
436: } *VN;
437:
438: typedef struct oUP {
439: int d;
440: Num c[1];
441: } *UP;
442:
443: typedef struct oDUM {
444: int n;
445: UM f;
446: } *DUM;
447:
448: struct order_pair {
449: int order, length;
450: };
451:
452: struct order_spec {
453: int id;
454: Obj obj;
455: int nv;
456: union {
457: int simple;
458: struct {
459: int length;
460: struct order_pair *order_pair;
461: } block;
462: struct {
463: int row;
464: int **matrix;
465: } matrix;
466: } ord;
467: };
468:
469: /* structure for cputime */
470:
471: struct oEGT {
472: double exectime,gctime;
473: };
474:
475: /* constant */
476:
477: /* ground finite field specification */
478: #define FF_NOT_SET 0
479: #define FF_GFP 1
480: #define FF_GF2N 2
481: #define FF_GFPN 3
1.12 noro 482: #define FF_GFS 4
1.21 noro 483: #define FF_GFSN 5
1.11 saito 484:
485: /* include interval.h */
486: #include "interval.h"
1.1 noro 487:
488: #define INDEX 100
489:
490: #if USE_FLOAT
491: typedef float ModNum;
492: #define NPrimes 536
493: #else
494: typedef unsigned int ModNum;
495: #define NPrimes 13681
496: #endif
497:
498: /* general macros */
499: #define MAX(a,b) ((a) > (b) ? (a) : (b) )
500: #define MIN(a,b) ((a) > (b) ? (b) : (a) )
501: #ifdef ABS
502: #undef ABS
503: #endif
504: #define ABS(a) ((a)>0?(a):-(a))
505: #define ID(p) ((p)->id)
506: #define OID(p) (((Obj)(p))->id)
507: #define NID(p) (((Num)(p))->nid)
508: #define BDY(p) ((p)->body)
509: #define VR(p) ((p)->v)
510: #define NAME(p) ((p)->name)
511: #define NEXT(p) ((p)->next)
512: #define NM(q) ((q)->nm)
513: #define DN(q) ((q)->dn)
514: #define SGN(q) ((q)->sgn)
515: #define DC(p) ((p)->dc)
516: #define COEF(p) ((p)->c)
517: #define DEG(p) ((p)->d)
518: #define PL(n) ((n)->p)
519: #define BD(n) ((n)->b)
520: #define CONT(a) ((a)->cont)
521: #define UDEG(f) BD(NM(DEG(DC(f))))[0]
522: #define UCOEF(f) (COEF(DC(f)))
523: #define LC(f) (NUM(f)?(f):COEF(DC(f)))
524:
525: /* memory allocators (W_... : uses alloca) */
526:
527: #if 0
528: #define MALLOC(d) Risa_GC_malloc(d)
529: #define MALLOC_ATOMIC(d) Risa_GC_malloc_atomic(d)
530: #define REALLOC(p,d) Risa_GC_realloc(p,d)
531: #else
532: #define MALLOC(d) GC_malloc(d)
533: #define MALLOC_ATOMIC(d) GC_malloc_atomic(d)
534: #define REALLOC(p,d) GC_realloc(p,d)
535: #endif
536: #define CALLOC(d,e) MALLOC((d)*(e))
537:
538: #if (defined(__GNUC__) || defined(vax) || defined(apollo) || defined(alloca) || defined(VISUAL))
539: #define ALLOCA(d) alloca(d)
540: #else
541: #define ALLOCA(d) MALLOC(d)
542: #endif
543:
544: #define TRUESIZE(type,n,atype) (sizeof(struct type)+MAX((n),0)*sizeof(atype))
545: #define NALLOC(d) ((N)MALLOC_ATOMIC(TRUESIZE(oN,(d)-1,int)))
546: #define UMALLOC(d) ((UM)MALLOC(TRUESIZE(oUM,d,int)))
547: #define UPALLOC(d) ((UP)MALLOC(TRUESIZE(oUP,(d),Num)))
548: #define C_UMALLOC(d) ((UM)MALLOC(TRUESIZE(oUM,d,int)))
549: #define MLALLOC(d) ((ML)MALLOC(TRUESIZE(oML,d,pointer)))
550:
551: #define W_ALLOC(d) ((int *)ALLOCA(((d)+1)*sizeof(int)))
552: #define W_CALLOC(n,type,p) \
553: ((p)=(type *)ALLOCA(((n)+1)*sizeof(type)),\
554: bzero((char *)(p),(int)(((n)+1)*sizeof(type))))
555: #define W_UMALLOC(d) ((UM)ALLOCA(TRUESIZE(oUM,d,int)))
556: #define W_UPALLOC(d) ((UP)ALLOCA(TRUESIZE(oUP,(d),Num)))
557: #define W_MLALLOC(d) ((ML)ALLOCA(TRUESIZE(oML,d,pointer)))
558: #define W_LUMALLOC(n,bound,p)\
559: {\
560: LUM ___q___;\
561: int ___i___,**___c___;\
562: (___q___) = (LUM)ALLOCA(TRUESIZE(oLUM,(n),int *));\
563: DEG(___q___) = n;\
564: for ( ___i___ = 0, ___c___ = (int **)COEF(___q___); ___i___ <= n; ___i___++ ) {\
565: ___c___[___i___] = (int *)ALLOCA(((bound)+1)*sizeof(int));\
566: bzero((char *)___c___[___i___],((bound)+1)*sizeof(int));\
567: }\
568: (p) = ___q___;\
569: }
570:
1.18 noro 571: #define W_BMALLOC(dx,dy,p)\
1.16 noro 572: {\
573: BM ___q___;\
574: int ___i___;\
575: UM *___c___;\
1.18 noro 576: (___q___) = (BM)ALLOCA(TRUESIZE(oBM,(dy),UM));\
577: DEG(___q___) = dy;\
1.16 noro 578: ___c___ = (UM *)COEF(___q___);\
1.18 noro 579: for ( ___i___ = 0; ___i___ <= dy; ___i___++ ) {\
580: ___c___[___i___] = W_UMALLOC(dx);\
581: clearum(___c___[___i___],dx);\
1.16 noro 582: }\
583: (p) = ___q___;\
584: }
585:
1.1 noro 586: #define NEWUP2(q,w)\
587: ((q)=(UP2)MALLOC_ATOMIC(TRUESIZE(oUP2,(w)-1,unsigned int)),\
588: bzero((char *)(q)->b,(w)*sizeof(unsigned int)))
589: #define W_NEWUP2(q,w)\
590: ((q)=(UP2)ALLOCA(TRUESIZE(oUP2,(w)-1,unsigned int)),\
591: bzero((char *)(q)->b,(w)*sizeof(unsigned int)))
592: #define W_NEW_UP2(q,w)\
593: ((q).b=(unsigned int *)ALLOCA((w)*sizeof(unsigned int)))
594:
595: /* cell allocators */
596: #define NEWQ(q) ((q)=(Q)MALLOC(sizeof(struct oQ)),OID(q)=O_N,NID(q)=N_Q)
597: #define NEWMQ(q) ((q)=(MQ)MALLOC_ATOMIC(sizeof(struct oMQ)),OID(q)=O_N,NID(q)=N_M)
1.12 noro 598: #define NEWGFS(q) ((q)=(GFS)MALLOC_ATOMIC(sizeof(struct oGFS)),OID(q)=O_N,NID(q)=N_GFS)
1.21 noro 599: #define NEWGFSN(q) ((q)=(GFSN)MALLOC(sizeof(struct oGFSN)),OID(q)=O_N,NID(q)=N_GFSN)
1.1 noro 600: #define NEWP(p) ((p)=(P)MALLOC(sizeof(struct oP)),OID(p)=O_P)
601: #define NEWR(r) ((r)=(R)MALLOC(sizeof(struct oR)),OID(r)=O_R,(r)->reduced=0)
602: #define NEWLIST(l) ((l)=(LIST)MALLOC(sizeof(struct oLIST)),OID(l)=O_LIST)
603: #define NEWVECT(l) ((l)=(VECT)MALLOC(sizeof(struct oVECT)),OID(l)=O_VECT)
604: #define NEWSTR(l) ((l)=(STRING)MALLOC(sizeof(struct oSTRING)),OID(l)=O_STR)
605: #define NEWCOMP(c,n) ((c)=(COMP)MALLOC(sizeof(struct oCOMP)+((n)-1)*sizeof(Obj)),OID(c)=O_COMP)
606: #define NEWDP(d) ((d)=(DP)MALLOC(sizeof(struct oDP)),OID(d)=O_DP)
607: #define NEWUSINT(u) ((u)=(USINT)MALLOC_ATOMIC(sizeof(struct oUSINT)),OID(u)=O_USINT)
608: #define NEWERR(e) ((e)=(ERR)MALLOC(sizeof(struct oERR)),OID(e)=O_ERR)
609: #define NEWMATHCAP(e) ((e)=(MATHCAP)MALLOC(sizeof(struct oMATHCAP)),OID(e)=O_MATHCAP)
1.6 noro 610: #define NEWBYTEARRAY(e) ((e)=(BYTEARRAY)MALLOC(sizeof(struct oBYTEARRAY)),OID(e)=O_BYTEARRAY)
1.13 noro 611: #define NEWQUOTE(e) ((e)=(QUOTE)MALLOC(sizeof(struct oQUOTE)),OID(e)=O_QUOTE)
1.1 noro 612:
613: #define NEWNODE(a) ((a)=(NODE)MALLOC(sizeof(struct oNODE)))
614: #define NEWDC(dc) ((dc)=(DCP)MALLOC(sizeof(struct oDCP)))
615: #define NEWV(v) ((v)=(V)MALLOC(sizeof(struct oV)))
616: #define NEWVL(vl) ((vl)=(VL)MALLOC(sizeof(struct oVL)))
617: #define NEWMP(m) ((m)=(MP)MALLOC(sizeof(struct oMP)))
1.25 ! noro 618: #define NEWDLBUCKET(a) ((a)=(DLBUCKET)MALLOC(sizeof(struct oDLBUCKET)))
1.1 noro 619:
620: #define NEWMAT(l) ((l)=(MAT)MALLOC(sizeof(struct oMAT)),OID(l)=O_MAT)
621: #define NEWGF2MAT(l) ((l)=(GF2MAT)MALLOC(sizeof(struct oGF2MAT)),OID(l)=O_GF2MAT)
622: #define NEWGFMMAT(l) ((l)=(GFMMAT)MALLOC(sizeof(struct oGF2MAT)),OID(l)=O_GFMMAT)
623: #define NEWReal(q) ((q)=(Real)MALLOC_ATOMIC(sizeof(struct oReal)),OID(q)=O_N,NID(q)=N_R)
624: #define NEWAlg(r) ((r)=(Alg)MALLOC(sizeof(struct oAlg)),OID(r)=O_N,NID(r)=N_A)
625: #define NEWBF(q,l) ((q)=(BF)MALLOC_ATOMIC(TRUESIZE(oBF,(l)-1,long)),OID(q)=O_N,NID(q)=N_B)
626: #define NEWC(r) ((r)=(C)MALLOC(sizeof(struct oC)),OID(r)=O_N,NID(r)=N_C)
627: #define NEWLM(r) ((r)=(LM)MALLOC(sizeof(struct oLM)),OID(r)=O_N,NID(r)=N_LM)
628: #define NEWGF2N(r) ((r)=(GF2N)MALLOC(sizeof(struct oGF2N)),OID(r)=O_N,NID(r)=N_GF2N)
629: #define NEWGFPN(r) ((r)=(GFPN)MALLOC(sizeof(struct oGFPN)),OID(r)=O_N,NID(r)=N_GFPN)
630: #define NEWDL(d,n) \
631: ((d)=(DL)MALLOC_ATOMIC(TRUESIZE(oDL,(n)-1,int)),bzero((char *)(d),TRUESIZE(oDL,(n)-1,int)))
1.9 noro 632: #define NEWDL_NOINIT(d,n) \
633: ((d)=(DL)MALLOC_ATOMIC(TRUESIZE(oDL,(n)-1,int)))
1.1 noro 634:
635: #define MKP(v,dc,p) \
636: (!DEG(dc)?((p)=COEF(dc)):(NEWP(p),VR(p)=(v),DC(p)=(dc),(p)))
637: #define MKV(v,p) \
638: (NEWP(p),VR(p)=(v),NEWDC(DC(p)),\
639: DEG(DC(p))=ONE,COEF(DC(p))=(P)ONE,NEXT(DC(p))=0)
640: #define MKRAT(n,d,r,p) \
641: (NEWR(p),NM(p)=(n),DN(p)=(d),(p)->reduced=(r))
642: #define MKMV(v,p) \
643: (NEWP(p),VR(p)=(v),NEWDC(DC(p)),\
644: DEG(DC(p))=ONE,COEF(DC(p))=(P)ONEM,NEXT(DC(p))=0)
645: #define MKNODE(a,b,c) \
646: (NEWNODE(a),(a)->body=(pointer)b,NEXT(a)=(NODE)(c))
647: #define MKLIST(a,b) (NEWLIST(a),(a)->body=(NODE)(b))
648: #define MKVECT(m,l) \
649: (NEWVECT(m),(m)->len=(l),(m)->body=(pointer *)CALLOC((l),sizeof(pointer)))
650: #define MKMAT(m,r,c) \
651: (NEWMAT(m),(m)->row=(r),(m)->col=(c),(m)->body=(pointer **)almat_pointer((r),(c)))
652: #define TOGF2MAT(r,c,b,m) (NEWGF2MAT(m),(m)->row=(r),(m)->col=(c),(m)->body=(b))
653: #define TOGFMMAT(r,c,b,m) (NEWGFMMAT(m),(m)->row=(r),(m)->col=(c),(m)->body=(b))
654: #define MKSTR(a,b) (NEWSTR(a),(a)->body=(char *)(b))
655: #define MKDP(n,m,d) (NEWDP(d),(d)->nv=(n),BDY(d)=(m))
656: #define MKLM(b,l) (!(b)?(l)=0:(NEWLM(l),(l)->body=(b),(l)))
657: #define MKGF2N(b,l) (!(b)?(l)=0:(NEWGF2N(l),(l)->body=(b),(l)))
658: #define MKGFPN(b,l) (!(b)?(l)=0:(NEWGFPN(l),(l)->body=(b),(l)))
659: #define MKUSINT(u,b) (NEWUSINT(u),(u)->body=(unsigned)(b))
660: #define MKERR(e,b) (NEWERR(e),(e)->body=(Obj)(b))
661: #define MKMATHCAP(e,b) (NEWMATHCAP(e),(e)->body=(LIST)(b))
1.6 noro 662: #define MKBYTEARRAY(m,l) \
663: (NEWBYTEARRAY(m),(m)->len=(l),(m)->body=(char *)MALLOC_ATOMIC((l)),bzero((m)->body,(l)))
1.13 noro 664: #define MKQUOTE(q,b) (NEWQUOTE(q),(q)->body=(pointer)(b))
1.1 noro 665:
666: #define NEXTDC(r,c) \
667: if(!(r)){NEWDC(r);(c)=(r);}else{NEWDC(NEXT(c));(c)=NEXT(c);}
668: #define NEXTNODE(r,c) \
669: if(!(r)){NEWNODE(r);(c)=(r);}else{NEWNODE(NEXT(c));(c)=NEXT(c);}
670: #define NEXTMP(r,c) \
671: if(!(r)){NEWMP(r);(c)=(r);}else{NEWMP(NEXT(c));(c)=NEXT(c);}
1.9 noro 672: #define NEXTMP2(r,c,s) \
673: if(!(r)){(c)=(r)=(s);}else{NEXT(c)=(s);(c)=(s);}
1.25 ! noro 674: #define NEXTDLBUCKET(r,c) \
! 675: if(!(r)){NEWDLBUCKET(r);(c)=(r);}else{NEWDLBUCKET(NEXT(c));(c)=NEXT(c);}
1.1 noro 676:
677: /* convertors */
678: #define NTOQ(n,s,q) \
679: (!(n)?((q)=0):(NEWQ(q),SGN(q)=(s),NM(q)=(n),DN(q)=0,(q)))
680: #define NDTOQ(n,d,s,q) \
681: ((!(d)||UNIN(d))?NTOQ(n,s,q):(NEWQ(q),SGN(q)=(s),NM(q)=(n),DN(q)=(d),(q)))
682: #define DUPQ(p,q) \
683: (NEWQ(q),SGN(q)=SGN(p),NM(q)=NM(p),DN(q)=DN(p))
684: #define STOQ(n,q) \
685: ((!(n))?((q)=(Q)NULL):(NEWQ(q),\
686: SGN(q)=((n)>0?1:-1),NM(q)=NALLOC(1),\
687: PL(NM(q))=1,BD(NM(q))[0]=ABS(n),DN(q)=0,(q)))
688: #define UTOMQ(a,b) \
689: ((a)?(NEWMQ(b),CONT(b)=(unsigned int)(a),(b)):((b)=0))
1.12 noro 690: #define MKGFS(a,b) \
691: ((NEWGFS(b),CONT(b)=(a),(b)))
1.21 noro 692: #define MKGFSN(a,b) \
693: ((DEG(a)>=0)?(NEWGFSN(b),BDY(b)=(a),(b)):((b)=0))
1.1 noro 694: #define STOMQ(a,b) \
695: ((a)?(NEWMQ(b),CONT(b)=(a),(b)):((b)=0))
696: #define UTON(u,n) \
697: ((!(u))?((n)=(N)NULL):((n)=NALLOC(1),PL(n)=1,BD(n)[0]=(unsigned int)(u),(n)))
698: #define UTOQ(n,q) \
699: ((!(n))?((q)=(Q)NULL):(NEWQ(q),\
700: SGN(q)=1,NM(q)=NALLOC(1),\
701: PL(NM(q))=1,BD(NM(q))[0]=(unsigned int)(n),DN(q)=0,(q)))
702: #define QTOS(q) (!(q)?0:SGN(q)*((int)BD(NM(q))[0]))
703: #define STON(i,n)\
704: (i?((n)=NALLOC(1),PL(n)=1,BD(n)[0]=(i),(n)):((n)=(N)0))
705: #define PTOR(a,b) \
706: (!(a)?((b)=0):(NEWR(b),NM(b)=(a),DN(b)=(P)ONE,(b)->reduced=1,(b)))
707: #define RTOS(a) (!(a)?0:QTOS((Q)NM((R)a)))
708: #define MKReal(a,b) (!(a)?((b)=0):(NEWReal(b),BDY(b)=(a),(b)))
709: #define MKAlg(b,r) \
710: (!(b)?((r)=0):NUM(b)?((r)=(Alg)(b)):(NEWAlg(r),BDY(r)=(Obj)(b),(r)))
711:
1.3 noro 712: #if PARI
713: #define ToReal(a) (!(a)?(double)0.0:REAL(a)?BDY((Real)a):RATN(a)?RatnToReal((Q)a):BIGFLOAT(a)?rtodbl(BDY((BF)a)):0)
714: #else
715: #define ToReal(a) (!(a)?(double)0.0:REAL(a)?BDY((Real)a):RATN(a)?RatnToReal((Q)a):0.0)
716: #endif
1.1 noro 717:
718: /* predicates */
719: #define NUM(p) (OID(p)==O_N)
720: #define RAT(p) (OID(p)==O_R)
721: #define RATN(a) (NID(a)==N_Q)
1.22 noro 722: #define INT(q) (!(q)||(NUM(q)&&RATN((Num)q)&&!DN((Q)q)))
1.1 noro 723: #define REAL(a) (NID(a)==N_R)
1.3 noro 724: #define BIGFLOAT(a) (NID(a)==N_B)
1.1 noro 725: #define SFF(a) (NID(a)==N_M)
726: #define UNIQ(q) ((q)&&NUM(q)&&RATN(q)&&(SGN((Q)q)==1)&&UNIN(NM((Q)q))&&(!DN((Q)q)))
727: #define UNIMQ(q) ((q)&&NUM(q)&&SFF(q)&&(CONT((MQ)q)==1))
728: #define MUNIQ(q) ((q)&&NUM(q)&&RATN(q)&&(SGN((Q)q)==-1)&&UNIN(NM((Q)q))&&(!DN((Q)q)))
729: #define MUNIMQ(q) ((q)&&NUM(q)&&SFF(q)&&(CONT((MQ)q)==-1))
730: #define UNIN(n) ((n)&&(PL(n)==1)&&(BD(n)[0]==1))
731: #define EVENN(n) ((!(n))||(!(BD(n)[0]%2)))
732:
1.8 noro 733: /* special macros for private memory management */
734:
735: #define NV(p) ((p)->nv)
736: #define C(p) ((p)->c)
737: #define ITOS(p) (((unsigned int)(p))&0x7fffffff)
738: #define STOI(i) ((P)((unsigned int)(i)|0x80000000))
1.15 noro 739:
740: /* immediate GFS representation */
741:
742: #define IFTOF(p) ((int)(((unsigned int)(p))&0x7fffffff))
743: #define FTOIF(i) ((int)(((unsigned int)(i)|0x80000000)))
1.8 noro 744:
745: struct cdl {
746: P c;
747: DL d;
748: };
749:
750: struct cdlm {
751: int c;
752: DL d;
753: };
754:
755: extern MP _mp_free_list;
756: extern DP _dp_free_list;
757: extern DL _dl_free_list;
758: extern int current_dl_length;
759:
760: #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)
761: #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)))
762: #define _NEWMP(m) if(!_mp_free_list)_MP_alloc(); (m)=_mp_free_list; _mp_free_list = NEXT(_mp_free_list)
1.10 noro 763: #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 764:
765: #define _NEXTMP(r,c) \
766: if(!(r)){_NEWMP(r);(c)=(r);}else{_NEWMP(NEXT(c));(c)=NEXT(c);}
767:
768: #define _NEXTMP2(r,c,s) \
769: if(!(r)){(c)=(r)=(s);}else{NEXT(c)=(s);(c)=(s);}
770:
771: #define _FREEDL(m) *((DL *)m)=_dl_free_list; _dl_free_list=(m)
772: #define _FREEMP(m) NEXT(m)=_mp_free_list; _mp_free_list=(m)
773: #define _FREEDP(m) BDY(m)=(MP)_dp_free_list; _dp_free_list=(m)
1.1 noro 774:
775: /* externals */
776: #if 0
777: double NatToReal();
778: double RatnToReal();
779: #endif
780:
781: extern struct oR oUNIR;
782: extern struct oQ oUNIQ;
783: extern struct oMQ oUNIMQ;
784: extern struct oN oUNIN;
785: extern struct oUP2 oONEUP2;
786: extern struct oV oVAR[];
787: extern struct oV oPVAR[];
788: extern struct oVL oVLIST[];
789: extern struct oVL oPVLIST[];
790: extern VL CO,ALG;
791: extern VL PVL;
792: extern R ONER;
793: extern Q ONE;
794: extern MQ ONEM;
795: extern LM ONELM;
796: extern N ONEN;
797: extern UP2 ONEUP2;
798:
799: extern FILE *asir_out;
1.7 noro 800: #if defined(__GNUC__)
1.1 noro 801: extern const int sprime[];
802: #else
803: extern int sprime[];
804: #endif
1.14 noro 805:
806: extern int lprime_size;
807: extern int *lprime;
1.1 noro 808:
809: extern void (*addnumt[])();
810: extern void (*subnumt[])();
811: extern void (*mulnumt[])();
812: extern void (*divnumt[])();
813: extern void (*pwrnumt[])();
814: extern int (*cmpnumt[])();
815: extern void (*chsgnnumt[])();
816:
817: /* prototypes */
818: int compui(VL,USINT,USINT);
1.6 noro 819: int compbytearray(VL,BYTEARRAY,BYTEARRAY);
1.1 noro 820:
821: void powermodup(UP,UP *);
822: void hybrid_powermodup(UP,UP *);
823:
824: void powertabup(UP,UP,UP *);
825: void hybrid_powertabup(UP,UP,UP *);
826:
827: void generic_powermodup(UP,UP,Q,UP *);
828: void hybrid_generic_powermodup(UP,UP,Q,UP *);
829:
830: void powermod1up(UP,UP *);
831: void hybrid_rembymulup_special(int,UP,UP,UP,UP *);
832: void hybrid_tmulup(int,UP,UP,int,UP *);
833: void hybrid_squareup(int,UP,UP *);
834: void hybrid_mulup(int,UP,UP,UP *);
835:
836: void getmod_lm(N *);
837:
838: int maxblenup(UP);
839: void monicup(UP,UP *);
840: void simpup(UP,UP *);
841: void simpnum(Num,Num *);
842: void decompp(P,Q,P *,P *);
843: void truncp(P,Q,P *);
844: void uremp(P,P,P *);
845: void ugcdp(P,P,P *);
846: void reversep(P,Q,P *);
847: void invmodp(P,Q,P *);
848: void addup(UP,UP,UP *);
849: void subup(UP,UP,UP *);
850: void chsgnup(UP,UP *);
851: void mulup(UP,UP,UP *);
852: void tmulup(UP,UP,int,UP *);
853: void squareup(UP,UP *);
854: void remup(UP,UP,UP *);
855: void remup_destructive(UP,UP);
856: void qrup(UP,UP,UP *,UP *);
857: void qrup_destructive(UP,UP);
858: void gcdup(UP,UP,UP *);
859: void reverseup(UP,int,UP *);
860: void invmodup(UP,int,UP *);
861: void pwrup(UP,Q,UP *);
862: void squarep_gf2n(VL,P,P *);
863: void kmulp(VL,P,P,P *);
864: void ksquarep(VL,P,P *);
865: void kmulup(UP,UP,UP *);
866: void ksquareup(UP,UP *);
867: void extractup(UP,int,int,UP *);
868: void copyup(UP,UP);
869: void c_copyup(UP,int,pointer *);
870: void kmulupmain(UP,UP,UP *);
871: void ksquareupmain(UP,UP *);
872: void rembymulup(UP,UP,UP *);
873: void rembymulup_special(UP,UP,UP,UP *);
874: void tkmulup(UP,UP,int,UP *);
875: void shiftup(UP,int,UP *);
876: void set_degreeup(UP,int);
877: void decompup(UP,int,UP *,UP *);
878: void truncup(UP,int,UP *);
879: void uptofmarray(int,UP,ModNum *);
880: void fmarraytoup(ModNum *,int,UP *);
881: void uiarraytoup(unsigned int **,int,int,UP *);
882: void adj_coefup(UP,N,N,UP *);
883: void uptolmup(UP,UP *);
884: void remcup(UP,N,UP *);
885: void fft_mulup(UP,UP,UP *);
886: void fft_squareup(UP,UP *);
887: void trunc_fft_mulup(UP,UP,int,UP *);
888: void shoup_fft_mulup(UP,UP,UP *);
889: void shoup_fft_squareup(UP,UP *);
890: void shoup_trunc_fft_mulup(UP,UP,int,UP *);
891: void crup(ModNum **,int,int *,int,N,UP *);
892: void shoup_crup(ModNum **,int,int *,int,N,N,UP *);
893: void squareup_gf2n(UP,UP *);
894: void powermodup_gf2n(UP,UP *);
895: void generic_powermodup_gf2n(UP,UP,Q,UP *);
896: void tracemodup_gf2n(UP,UP,Q,UP *);
897: void tracemodup_gf2n_slow(UP,UP,Q,UP *);
898: void tracemodup_gf2n_tab(UP,UP,Q,UP *);
899: void square_rem_tab_up_gf2n(UP,UP *,UP *);
900: void powertabup_gf2n(UP,UP,UP *);
901: void find_root_gf2n(UP,GF2N *);
902:
903: int cmpdl_matrix(int,DL,DL);
904: int cmpdl_order_pair(int,DL,DL);
905: int cmpdl_elim(int,DL,DL);
906: int cmpdl_blexrev(int,DL,DL);
907: int cmpdl_bgradrev(int,DL,DL);
908: int cmpdl_brevrev(int,DL,DL);
909: int cmpdl_brevgradlex(int,DL,DL);
910: int cmpdl_bgradlex(int,DL,DL);
911: int cmpdl_blex(int,DL,DL);
912: int cmpdl_revgradlex(int,DL,DL);
913: int cmpdl_gradlex(int,DL,DL);
914: int cmpdl_revlex(int,DL,DL);
915: int cmpdl_lex(int,DL,DL);
916: int compd(VL,DP,DP);
917: void adddl(int,DL,DL,DL *);
918: void divsdc(VL,DP,P,DP *);
919: void muldc(VL,DP,P,DP *);
920: void muldm(VL,DP,MP,DP *);
921: void muld(VL,DP,DP,DP *);
922: void chsgnd(DP,DP *);
923: void subd(VL,DP,DP,DP *);
924: void addd(VL,DP,DP,DP *);
925: int sugard(MP);
926: void nodetod(NODE,DP *);
927: void dtop(VL,VL,DP,P *);
928: void ptod(VL,VL,P,DP *);
929: void initd(struct order_spec *);
930:
931: void _printdp(DP);
932: void _dp_sp_mod(DP,DP,int,DP *);
933: void _dp_mod(DP,int,NODE,DP *);
934: void _dp_red_mod(DP,DP,int,DP *);
935: void _dtop_mod(VL,VL,DP,P *);
936: void _mulmdm(VL,int,DP,MP,DP *);
937: void _mulmd(VL,int,DP,DP,DP *);
938: void _chsgnmd(int,DP,DP *);
939: void _submd(VL,int,DP,DP,DP *);
940: void _addmd(VL,int,DP,DP,DP *);
941: void _mdtop(VL,int,VL,DP,P *);
942: void divsmdc(VL,int,DP,P,DP *);
943: void mulmdc(VL,int,DP,P,DP *);
944: void mulmdm(VL,int,DP,MP,DP *);
945: void mulmd(VL,int,DP,DP,DP *);
946: void chsgnmd(int,DP,DP *);
947: void submd(VL,int,DP,DP,DP *);
948: void addmd(VL,int,DP,DP,DP *);
949: void mdtop(VL,int,VL,DP,P *);
950: void mptomd(VL,int,VL,P,DP *);
951: void ptomd(VL,int,VL,P,DP *);
952: int p_mag(P);
953: int n_bits(N);
954: void gcdBinary_27n(N,N,N *);
955: void rtime_init(void);
956: void setmod_gf2n(P);
957: void mt_sgenrand(unsigned long);
958: unsigned long mt_genrand(void);
959: #if defined(VISUAL)
960: void srandom(unsigned int);
961: unsigned int random(void);
962: #endif
963: void gcdbmodn(N,N,N *);
964: void gcdbinn(N,N,N *);
965: void gcdmodn(N,N,N *);
966: void gcdaccn(N,N,N *);
967: void gcdEuclidn(N,N,N *);
968: void GC_free(void *);
969: void FFT_primes(int,int *,int *,int *);
970: int FFT_pol_product(unsigned int,unsigned int *, unsigned int,unsigned int *,
971: unsigned int *,int,unsigned int *);
972: int FFT_pol_square(unsigned int,unsigned int *,
973: unsigned int *,int,unsigned int *);
974: void dcptolist(DCP,LIST *);
975: void gcdprsmp(VL,int,P,P,P *);
976: void mult_mod_tab(UM,int,UM *,UM,int);
977: int nfctr_mod(UM,int);
978: int irred_check(UM,int);
979: void modfctrp(P,int,int,DCP *);
980: void pf_init(void);
981: void binaryton(char *,N *);
982: void hexton(char *,N *);
983: void ptolmp(P,P *);
984: void lmptop(P,P *);
985: void ulmptoum(int,UP,UM);
986: void objtobobj(int,Obj,Obj *);
987: void bobjtoobj(int,Obj,Obj *);
988: void numtobnum(int,Num,Num *);
989: void bnumtonum(int,Num,Num *);
990: void ptobp(int,P,P *);
991: void bptop(int,P,P *);
992: void listtoblist(int,LIST,LIST *);
993: void blisttolist(int,LIST,LIST *);
994: void vecttobvect(int,VECT,VECT *);
995: void bvecttovect(int,VECT,VECT *);
996: void mattobmat(int,MAT,MAT *);
997: void bmattomat(int,MAT,MAT *);
998: void n32ton27(N,N *);
999: void n27ton32(N,N *);
1000: void kmulum(int,UM,UM,UM);
1001: void saveobj(FILE *,Obj);
1002: void endian_init(void);
1003: void write_char(FILE *,unsigned char *);
1004: void write_short(FILE *,unsigned short *);
1005: void write_int(FILE *,unsigned int *);
1006: void write_double(FILE *,double *);
1007: void write_intarray(FILE *,unsigned int *,int);
1008: void write_string(FILE *,unsigned char *,int);
1009: void savestr(FILE *,char *);
1010: void loadstr(FILE *,char **);
1011: void savevl(FILE *,VL);
1012: void loadvl(FILE *);
1013: void skipvl(FILE *);
1014: void savev(FILE *,V);
1015: void loadv(FILE *,V *);
1016: int save_convv(V);
1017: V load_convv(int);
1018: void swap_bytes(char *,int,int);
1019: void read_char(FILE *,unsigned char *);
1020: void read_short(FILE *,unsigned short *);
1021: void read_int(FILE *,unsigned int *);
1022: void read_double(FILE *,double *);
1023: void read_intarray(FILE *,unsigned int *,int);
1024: void read_string(FILE *,unsigned char *,int);
1025: void loadobj(FILE *,Obj *);
1026: void invum(int,UM,UM,UM);
1027: void addarray_to(unsigned int *,int,unsigned int *,int);
1028: void muln_1(unsigned int *,int,unsigned int,unsigned int *);
1029: unsigned int divn_1(unsigned int *,int,unsigned int,unsigned int *);
1030: void ptoup(P,UP *);
1031: void uptop(UP,P *);
1032: void printnum(Num);
1033: void printv(VL,V);
1034: void kmulq(Q,Q,Q *);
1035: void bshiftn(N,int,N *);
1036: void remn(N,N,N*);
1037: void simplm(LM,LM *);
1038: void qtolm(Q,LM *);
1039: int qpcheck(Obj);
1040: int headsgn(P);
1041: void adjsgn(P,DCP);
1042: void setmod_g2n(P);
1043: void simpgf2n(GF2N,GF2N *);
1044: void ptogf2n(Obj,GF2N *);
1045: void gf2ntop(GF2N,P *);
1046: void gf2ntovect(GF2N,VECT *);
1047: void squaregf2n(GF2N,GF2N *);
1048: void randomgf2n(GF2N *);
1049: void invgf2n(GF2N,GF2N *);
1050: void kmuln(N,N,N *);
1051: void extractn(N,int,int,N *);
1052: void copyn(N,int,int *);
1053: void kmulnmain(N,N,N *);
1054: int qcoefp(Obj);
1055: int qcoefr(Obj);
1056: int get_allocwords(void);
1057: double get_clock(void);
1058: void get_eg(struct oEGT *);
1059: void printtime(struct oEGT *,struct oEGT *,double);
1060: void init_eg(struct oEGT *);
1061: void add_eg(struct oEGT *,struct oEGT *,struct oEGT *);
1062: void print_eg(char *,struct oEGT *);
1063: void print_split_eg(struct oEGT *,struct oEGT *);
1064: void print_split_e(struct oEGT *,struct oEGT *);
1065: void suspend_timer(void);
1066: void resume_timer(void);
1067: void reset_engine(void);
1068: void notdef(VL,Obj,Obj,Obj *);
1069: void error(char *);
1070: void ptoup2(P,UP2 *);
1071: void ptoup2_sparse(P,UP2 *);
1072: void up2top(UP2,P *);
1073: void up2tovect(UP2,VECT *);
1074: void up2ton(UP2,Q *);
1075: void ntoup2(Q,UP2 *);
1076: void gen_simpup2(UP2,GEN_UP2,UP2 *);
1077: void gen_simpup2_destructive(UP2,GEN_UP2);
1078: void gen_invup2(UP2,GEN_UP2,UP2 *);
1079: void gen_pwrmodup2(UP2,Q,GEN_UP2,UP2 *);
1080: void simpup2(UP2,UP2,UP2 *);
1081: int degup2(UP2);
1082: int degup2_sparse(UP2);
1083: int degup2_1(unsigned int);
1084: void addup2(UP2,UP2,UP2 *);
1085: void subup2(UP2,UP2,UP2 *);
1086: void mulup2_n1(unsigned int *,int,unsigned int,unsigned int *);
1087: void mulup2_nh(unsigned int *,int,unsigned int,unsigned int *);
1088: void _mulup2_1(UP2,unsigned int,UP2);
1089: void _mulup2_h(UP2,unsigned int,UP2);
1090: void mulup2(UP2,UP2,UP2 *);
1091: void _kmulup2_(unsigned int *,unsigned int *,int,unsigned int *);
1092: void _mulup2_nn(unsigned int *,unsigned int *,int,unsigned int *);
1093: void _mulup2(UP2,UP2,UP2);
1094: void _mulup2_(_UP2,_UP2,_UP2);
1095: void squareup2(UP2,UP2 *);
1096: void _adjup2(UP2);
1097: void _adjup2_(_UP2);
1098: void _addup2(UP2,UP2,UP2);
1099: void _addup2_destructive(UP2,UP2);
1100: void _addup2_(_UP2,_UP2,_UP2);
1101: void _addtoup2_(_UP2,_UP2);
1102: unsigned int mulup2_bb(unsigned int,unsigned int);
1103: void init_up2_tab(void);
1104: unsigned int quoup2_11(unsigned int,unsigned int);
1105: void divup2_1(unsigned int,unsigned int,int,int,unsigned int *,unsigned int *);
1106: void qrup2(UP2,UP2,UP2 *,UP2 *);
1107: void _qrup2(UP2,UP2,UP2,UP2);
1108: void remup2(UP2,UP2,UP2 *);
1109: void _remup2(UP2,UP2,UP2);
1110: void remup2_sparse(UP2,UP2,UP2 *);
1111: void remup2_sparse_destructive(UP2,UP2);
1112: void remup2_type1_destructive(UP2,int);
1113: void remup2_3_destructive(UP2,UP2);
1114: void remup2_5_destructive(UP2,UP2);
1115: void _invup2_1(unsigned int,unsigned int,unsigned int *,unsigned int *);
1116: void _gcdup2_1(unsigned int,unsigned int,unsigned int *);
1117: void up2_init_eg(void);
1118: void up2_show_eg(void);
1119: void invup2(UP2,UP2,UP2 *);
1120: void gcdup2(UP2,UP2,UP2 *);
1121: void chsgnup2(UP2,UP2 *);
1122: void pwrmodup2(UP2,Q,UP2,UP2 *);
1123: void pwrmodup2_sparse(UP2,Q,UP2,UP2 *);
1124: int compup2(UP2,UP2);
1125: void printup2(UP2);
1126: void _copyup2(UP2,UP2);
1127: void _bshiftup2(UP2,int,UP2);
1128: void _bshiftup2_destructive(UP2,int);
1129: void diffup2(UP2,UP2 *);
1130: int sqfrcheckup2(UP2);
1131: int irredcheckup2(UP2);
1132: int irredcheck_dddup2(UP2);
1133: void _copy_up2bits(UP2,unsigned int **,int);
1134: void _print_frobmat(unsigned int **,int,int);
1135: int compute_multiplication_matrix(P,GF2MAT *);
1136: void compute_change_of_basis_matrix(P,P,int,GF2MAT *,GF2MAT *);
1137: int compute_representation_conversion_matrix(P,GF2MAT *,GF2MAT *);
1138: void mul_nb(GF2MAT,unsigned int *,unsigned int *,unsigned int *);
1139: void leftshift(unsigned int *,int);
1140: void mat_to_gf2mat(MAT,unsigned int ***);
1141: void gf2mat_to_mat(unsigned int **,int,MAT *);
1142: void mulgf2mat(int,unsigned int **,unsigned int **,unsigned int **);
1143: void mulgf2vectmat(int,unsigned int *,unsigned int **,unsigned int *);
1144: int mulgf2vectvect(int,unsigned int *,unsigned int *);
1145: int invgf2mat(int,unsigned int **,unsigned int **);
1146: void _mulup2_11(unsigned int,unsigned int,unsigned int *);
1147: void _mulup2_22(unsigned int *,unsigned int *,unsigned int *);
1148: void _mulup2_33(unsigned int *,unsigned int *,unsigned int *);
1149: void _mulup2_44(unsigned int *,unsigned int *,unsigned int *);
1150: void _mulup2_55(unsigned int *,unsigned int *,unsigned int *);
1151: void _mulup2_66(unsigned int *,unsigned int *,unsigned int *);
1152: void printup2_(unsigned int *,int);
1153: void type1_bin_invup2(UP2,int,UP2 *);
1154: int int_bits(int);
1155:
1156:
1157: LUM LUMALLOC(int, int);
1.16 noro 1158: BM BMALLOC(int, int);
1.1 noro 1159: Obj ToAlg(Num);
1160: UM *berlemain(register int, UM, UM *);
1161: void *Risa_GC_malloc(size_t);
1162: void *Risa_GC_malloc_atomic(size_t);
1163: void *Risa_GC_realloc(void *,size_t);
1164: void *GC_malloc(size_t);
1165: void *GC_malloc_atomic(size_t);
1166: void *GC_realloc(void *,size_t);
1167: double NatToReal(N,int *);
1168: double RatnToReal(Q);
1169: double pwrreal0(double,int);
1.3 noro 1170: double rtodbl(); /* XXX */
1.1 noro 1171: int **almat(int,int);
1172: pointer **almat_pointer(int,int);
1173: int berlecnt(register int,UM);
1174: int berlecntmain(register int,int,int,register int **);
1175: int cmpalg(Num,Num);
1176: int cmpbf(Num,Num);
1177: int cmpcplx(Num,Num);
1178: int cmpn(N,N);
1179: int cmpq(Q,Q);
1180: int cmpreal(Real,Real);
1181: int cmpmi(MQ,MQ);
1182: int cmplm(LM,LM);
1183: int compmat(VL,MAT,MAT);
1184: int compnum(VL,Num,Num);
1185: int compp(VL,P,P);
1186: int compr(VL,Obj,Obj);
1187: int compstr(VL,STRING,STRING);
1188: int compvect(VL,VECT,VECT);
1189: int ctest(P,ML,int,int *);
1190: int cycchk(P);
1191: int dbound(V,P);
1192: int dcomp(P,P);
1193: int deg(V,P);
1194: int degtest(int,int *,ML,int);
1195: int divcheck(VL,P *,int,P,P);
1196: unsigned int divin(N,unsigned int,N *);
1197: int divtdcpz(VL,P,P,P *);
1198: int divtpz(VL,P,P,P *);
1199: int divum(register int,UM,UM,UM);
1200: int dm(int,int,int *);
1201: int dmb(int,int,int,int *);
1202: int dma(int,int,int,int *);
1203: int dmab(int,int,int,int,int *);
1204: int dmar(int,int,int,int);
1205: int dtestmain(P,Q,ML,int,int *,P *,P *);
1206: int geldb(VL,P);
1207: int getchomdeg(V,P);
1208: int getdeg(V,P);
1209: int getlchomdeg(V,P,int *);
1210: int homdeg(P);
1211: unsigned int invm(unsigned int,int);
1212: int iscycm(P);
1213: int iscycp(P);
1214: int lengthp(P);
1215: int mig(int,int,P);
1216: int mignotte(int,P);
1217: int minimain(register int,int,int,register int **);
1218: int ncombi(int,int,int,int *);
1219: int nextbin(VN,int);
1220: int nmonop(P);
1221: int pcoef(VL,VL,P,P *);
1222: int pcoef0(VL,VL,P,P *);
1223: unsigned int pwrm(register int,register int,int);
1224: unsigned int rem(N,unsigned int);
1225: int sqfrchk(P);
1226: int subn(N,N,N *);
1227: int ucmpp(P,P);
1228: int valideval(VL,DCP,VN);
1229: int zerovpchk(VL,P,VN);
1230:
1231: void addgf2n(GF2N,GF2N,GF2N *);
1232: void subgf2n(GF2N,GF2N,GF2N *);
1233: void mulgf2n(GF2N,GF2N,GF2N *);
1234: void divgf2n(GF2N,GF2N,GF2N *);
1235: void chsgngf2n(GF2N,GF2N *);
1236: void pwrgf2n(GF2N,Q, GF2N *);
1237: int cmpgf2n(GF2N,GF2N);
1238:
1239: void addgfpn(GFPN,GFPN,GFPN *);
1240: void subgfpn(GFPN,GFPN,GFPN *);
1241: void mulgfpn(GFPN,GFPN,GFPN *);
1242: void divgfpn(GFPN,GFPN,GFPN *);
1243: void chsgngfpn(GFPN,GFPN *);
1244: void pwrgfpn(GFPN,Q, GFPN *);
1245: int cmpgfpn(GFPN,GFPN);
1.12 noro 1246:
1247: void addgfs(GFS,GFS,GFS *);
1248: void subgfs(GFS,GFS,GFS *);
1249: void mulgfs(GFS,GFS,GFS *);
1250: void divgfs(GFS,GFS,GFS *);
1251: void chsgngfs(GFS,GFS *);
1252: void pwrgfs(GFS,Q, GFS *);
1253: int cmpgfs(GFS,GFS);
1.20 noro 1254:
1.21 noro 1255: void addgfsn(GFSN,GFSN,GFSN *);
1256: void subgfsn(GFSN,GFSN,GFSN *);
1257: void mulgfsn(GFSN,GFSN,GFSN *);
1258: void divgfsn(GFSN,GFSN,GFSN *);
1259: void chsgngfsn(GFSN,GFSN *);
1260: void pwrgfsn(GFSN,Q, GFSN *);
1261: int cmpgfsn(GFSN,GFSN);
1.1 noro 1262:
1263: void addalg(Num,Num,Num *);
1264: void addbf(Num,Num,Num *);
1265: void addcplx(Num,Num,Num *);
1266: void addm2p(VL,Q,Q,P,P,P *);
1267: void addm2q(Q,Q,Q,Q,Q *);
1268: void addmat(VL,MAT,MAT,MAT *);
1269: void addmp(VL,int,P,P,P *);
1270: void addmpq(int,P,P,P *);
1271: void addmptoc(VL,int,P,P,P *);
1272: void addmq(int,MQ,MQ,MQ *);
1273: void addn(N,N,N *);
1274: void addnum(VL,Num,Num,Num *);
1275: void addp(VL,P,P,P *);
1276: void addpadic(int,int,unsigned int *,unsigned int *);
1277: void addpq(P,P,P *);
1278: void addptoc(VL,P,P,P *);
1279: void addq(Q,Q,Q *);
1280: void addr(VL,Obj,Obj,Obj *);
1281: void addreal(Num,Num,Real *);
1282: void addmi(MQ,MQ,MQ *);
1283: void addlm(LM,LM,LM *);
1284: void addstr(VL,STRING,STRING,STRING *);
1285: void addum(int,UM,UM,UM);
1286: void addvect(VL,VECT,VECT,VECT *);
1.19 noro 1287: void addquote(VL,QUOTE,QUOTE,QUOTE *);
1.1 noro 1288: void adjc(VL,P,P,P,Q,P *,P *);
1289: void afctr(VL,P,P,DCP *);
1290: void afctrmain(VL,P,P,int,DCP *);
1291: void affine(VL,P,VN,P *);
1292: void affinemain(VL,P,V,int,P *,P *);
1293: void berle(int,int,P,ML *);
1294: void bnton(register int,N,N *);
1295: void cbound(VL,P,Q *);
1296: void chnrem(int,V,P,Q,UM,P *,Q *);
1297: void chnremp(VL,int,P,Q,P,P *);
1298: void chsgnalg(Num,Num *);
1299: void chsgnbf(Num a,Num *);
1300: void chsgncplx(Num,Num *);
1301: void chsgnmat(MAT,MAT *);
1302: void chsgnmp(int,P,P *);
1303: void chsgnnum(Num,Num *);
1304: void chsgnp(P,P *);
1305: void chsgnq(Q,Q *);
1306: void chsgnr(Obj,Obj *);
1307: void chsgnreal(Num,Num *);
1308: void chsgnmi(MQ,MQ *);
1309: void chsgnlm(LM,LM *);
1310: void chsgnvect(VECT,VECT *);
1.19 noro 1311: void chsgnquote(QUOTE,QUOTE *);
1.1 noro 1312: void clctv(VL,P,VL *);
1313: void clctvr(VL,Obj,VL *);
1314: void cm2p(Q,Q,P,P *);
1315: void cmax(P,Q *);
1316: void cmp(Q,P,P *);
1317: void coefp(P,int,P *);
1318: void cpylum(int,LUM,LUM);
1319: void cpyum(UM,UM);
1320: void csump(VL,P,Q *);
1321: void cycm(V,register int,DCP *);
1322: void cycp(V,register int,DCP *);
1323: void degp(V,P,Q *);
1324: void degum(UM,int);
1325: void detmp(VL,int,P **,int,P *);
1326: void detp(VL,P **,int,P *);
1327: void diffp(VL,P,V,P *);
1328: void diffum(register int,UM,UM);
1329: void divalg(Num,Num,Num *);
1330: void divbf(Num,Num,Num *);
1331: void divcp(P,Q,P *);
1332: void divcplx(Num,Num,Num *);
1333: void divmat(VL,Obj,Obj,Obj *);
1334: void divmq(int,MQ,MQ,MQ *);
1335: void divn(N,N,N *,N *);
1336: void divnmain(int,int,unsigned int *,unsigned int *,unsigned int *);
1337: void divnum(VL,Num,Num,Num *);
1338: void divq(Q,Q,Q *);
1339: void divr(VL,Obj,Obj,Obj *);
1340: void divreal(Num,Num,Real *);
1341: void divmi(MQ,MQ,MQ *);
1342: void divlm(LM,LM,LM *);
1343: void divsdcmp(VL,int,P,P,P *);
1344: void divsdcp(VL,P,P,P *);
1345: void divsmp(VL,int,P,P,P *);
1346: void divsn(N,N,N *);
1347: void divsp(VL,P,P,P *);
1348: void divsrdcmp(VL,int,P,P,P *,P *);
1349: void divsrdcp(VL,P,P,P *,P *);
1350: void divsrmp(VL,int,P,P,P *,P *);
1351: void divsrp(VL,P,P,P *,P *);
1352: void divvect(VL,Obj,Obj,Obj *);
1.19 noro 1353: void divquote(VL,QUOTE,QUOTE,QUOTE *);
1.1 noro 1354: void dtest(P,ML,int,DCP *);
1355: void dtestroot(int,int,P,LUM,struct oDUM *,DCP *);
1356: void dtestroot1(int,int,P,LUM,P *);
1357: void dtestsq(int,int,P,LUM,P *);
1358: void dtestsql(P,ML,struct oDUM *,DCP *);
1359: void estimatelc(VL,Q,DCP,VN,P *);
1360: void eucum(register int,UM,UM,UM,UM);
1361: void exthp(VL,P,int,P *);
1362: void exthpc(VL,V,P,int,P *);
1363: void ezgcd1p(VL,P,P,P *);
1364: void ezgcdhensel(P,int,UM,UM,ML *);
1365: void ezgcdnp(VL,P,P *,int,P *);
1366: void ezgcdnpp(VL,DCP,P *,int,P *);
1367: void ezgcdnpz(VL,P *,int,P *);
1368: void ezgcdp(VL,P,P,P *);
1369: void ezgcdpp(VL,DCP,P,P *);
1370: void ezgcdpz(VL,P,P,P *);
1371: void factorial(int,Q *);
1372: void fctrp(VL,P,DCP *);
1373: void fctrwithmvp(VL,P,V,DCP *);
1374: void gcda(VL,P,P,P,P *);
1375: void gcdcp(VL,P,P *);
1376: void gcdgen(P,ML,ML *);
1377: void gcdmonomial(VL,DCP *,int,P *);
1378: void gcdn(N,N,N *);
1379: void gcdprsp(VL,P,P,P *);
1380: void gcdum(register int,UM,UM,UM);
1381: void getmindeg(V,P,Q *);
1382: void henmain(LUM,ML,ML,ML *);
1383: void henmv(VL,VN,P,P,P,P,P,P,P,P,P,Q,int,P *,P *);
1384: void henmvmain(VL,VN,P,P,P,P,P,P,P,Q,Q,int,P *,P *);
1385: void henprep(P,ML,ML,ML *,ML *);
1386: void hensel(int,int,P,ML *);
1387: void henzq(P,P,UM,P,UM,int,int,P *,P *,P *,P *,Q *);
1388: void henzq1(P,P,Q,P *,P *,Q *);
1389: void hsq(int,int,P,int *,DCP *);
1390: void intersectv(VL,VL,VL *);
1391: void invl(Q,Q,Q *);
1392: void invmq(int,MQ,MQ *);
1393: void invq(Q,Q *);
1394: void lgp(P,N *,N *);
1395: void lumtop(V,int,int,LUM,P *);
1396: void markv(VN,int,P);
1397: void maxdegp(VL,P,VL *,P *);
1398: void mergev(VL,VL,VL,VL *);
1399: void mfctr(VL,P,DCP *);
1400: void mfctrhen2(VL,VN,P,P,P,P,P,P,P *);
1401: void mfctrmain(VL,P,DCP *);
1402: void mfctrwithmv(VL,P,V,DCP *);
1403: void min_common_vars_in_coefp(VL,P,VL *,P *);
1404: void minchdegp(VL,P,VL *,P *);
1405: void mindegp(VL,P,VL *,P *);
1406: void mini(register int,UM,UM);
1407: void minlcdegp(VL,P,VL *,P *);
1408: void mkbc(int,Q *);
1409: void mkbcm(int,int,MQ *);
1410: void mkssum(V,int,int,int,P *);
1411: void monomialfctr(VL,P,P *,DCP *);
1412: void mptop(P,P *);
1413: void mptoum(P,UM);
1414: void msqfr(VL,P,DCP *);
1415: void msqfrmain(VL,P,DCP *);
1416: void msqfrmainmain(VL,P,VN,P,DCP,DCP *,P *);
1417: void mulalg(Num,Num,Num *);
1418: void mulbf(Num,Num,Num *);
1419: void mulcplx(Num,Num,Num *);
1420: void mulin(N,unsigned int,unsigned int *);
1421: void mullum(int,int,LUM,LUM,LUM);
1422: void mullumarray(P,ML,int,int *,P *);
1423: void mulm2p(VL,Q,Q,P,P,P *);
1424: void mulm2q(Q,Q,Q,Q,Q *);
1425: void mulmat(VL,Obj,Obj,Obj *);
1426: void mulmatmat(VL,MAT,MAT,MAT *);
1427: void mulmatvect(VL,MAT,VECT,VECT *);
1428: void mulmp(VL,int,P,P,P *);
1429: void mulmpc(VL,int,P,P,P *);
1430: void mulmpq(int,P,P,P *);
1431: void mulmq(int,MQ,MQ,MQ *);
1432: void muln(N,N,N *);
1433: void mulnum(VL,Num,Num,Num *);
1434: void mulp(VL,P,P,P *);
1435: void mulpadic(int,int,unsigned int *,unsigned int *,unsigned int *);
1436: void mulpc(VL,P,P,P *);
1437: void mulpq(P,P,P *);
1438: void mulq(Q,Q,Q *);
1439: void mulr(VL,Obj,Obj,Obj *);
1440: void mulreal(Num,Num,Real *);
1441: void mulmi(MQ,MQ,MQ *);
1442: void mullm(LM,LM,LM *);
1443: void mulrmat(VL,Obj,MAT,MAT *);
1444: void mulrvect(VL,Obj,VECT,VECT *);
1445: void mulsgn(VN,VN,int,VN);
1446: void mulsum(register int,UM,register int,UM);
1447: void mulum(register int,UM,UM,UM);
1448: void mulvect(VL,Obj,Obj,Obj *);
1.19 noro 1449: void mulquote(VL,QUOTE,QUOTE,QUOTE *);
1.1 noro 1450: void mulvectmat(VL,VECT,MAT,VECT *);
1451: void next(VN);
1452: void nezgcdnp_sqfr_primitive(VL,P,P *,int,P *);
1453: void nezgcdnpp(VL,DCP,P *,int,P *);
1454: void nezgcdnpz(VL,P *,int,P *);
1455: void nezgcdnpzmain(VL,P *,int,P *);
1456: void nglob_init(void);
1457: void norm(P,Q *);
1458: void norm1(P,P *);
1459: void norm1c(P,Q *);
1460: void normalizemp(int,P);
1461: void nthrootchk(P,struct oDUM *,ML,DCP *);
1462: void nthrootn(N,int,N *);
1463: void ntobn(register int,N,N *);
1464: void nuezgcdnpzmain(VL,P *,int,P *);
1465: void padictoq(int,int,int *,Q *);
1466: void risa_pari_init(void);
1467: void pcp(VL,P,P *,P *);
1468: void pderivr(VL,Obj,V,Obj *);
1469: void pdiva(VL,P,P,P,P *);
1470: void pinva(P,P,P *);
1471: void plisttop(P *,V,int,P *);
1472: void pmonic(VL,P,P,P *);
1473: void pqra(VL,P,P,P,P *,P *);
1474: void premmp(VL,int,P,P,P *);
1475: void premp(VL,P,P,P *);
1476: void ptolum(int,int,P,LUM);
1477: void ptomp(int,P,P *);
1478: void ptoum(int,P,UM);
1479: void ptozp(P,int,Q *,P *);
1480: void ptozp0(P,P *);
1481: void pwralg(Num,Num,Num *);
1482: void pwrbf(Num,Num,Num *);
1483: void pwrcplx(Num,Num,Num *);
1484: void pwrcplx0(Num,int,Num *);
1485: void pwrlum(int,int,LUM,int,LUM);
1486: void pwrmat(VL,MAT,Obj,MAT *);
1487: void pwrmatmain(VL,MAT,int,MAT *);
1488: void pwrmp(VL,int,P,Q,P *);
1489: void pwrmq(int,MQ,Q,MQ *);
1490: void pwrn(N,int,N *);
1491: void pwrnum(VL,Num,Num,Num *);
1492: void pwrp(VL,P,Q,P *);
1493: void pwrq(Q,Q,Q *);
1494: void pwrr(VL,Obj,Obj,Obj *);
1.19 noro 1495: void pwrquote(VL,QUOTE,QUOTE,QUOTE *);
1.1 noro 1496: void pwrreal(Num,Num,Real *);
1497: void pwrmi(MQ,Q,MQ *);
1498: void pwrlm(LM,Q,LM *);
1499: void pwrum(int,UM,int,UM);
1500: void reallocarray(char **,int *,int *,int);
1501: void reductr(VL,Obj,Obj *);
1502: void reimtocplx(Num,Num,Num *);
1503: void rem2q(Q,Q,Q,Q *);
1504: void rema(VL,P,P,P,P *);
1505: void remq(Q,Q,Q *);
1506: void remsdcp(VL,P,P,P *);
1507: void reordermp(VL,int,VL,P,P *);
1508: void reorderp(VL,VL,P,P *);
1509: void reordvar(VL,V,VL *);
1510: void res_ch_det(VL,V,P,P,P *);
1511: void res_detmp(VL,int,V,P,P,P *);
1512: void restore(VL,P,VN,P *);
1513: void resultmp(VL,int,V,P,P,P *);
1514: void resultp(VL,V,P,P,P *);
1515: void setlum(int,int,LUM);
1516: void sort_by_deg(int,P *,P *);
1517: void sort_by_deg_rev(int,P *,P *);
1518: void sortfs(DCP *);
1519: void sortfsrev(DCP *);
1520: void sortplist(P *,int);
1521: void sortplistbyhomdeg(P *,int);
1522: void sprs(VL,V,P,P,P *);
1523: void sqa(VL,P,P,DCP *);
1524: void sqad(unsigned int,int);
1525: void sqfrp(VL,P,DCP *);
1526: void sqfrum(int,int,P,int *,struct oDUM **,ML *);
1527: void sqfrummain(int,UM,UM,struct oDUM **);
1528: void sqrtn(N,N *);
1529: void srch2(VL,V,P,P,P *);
1530: void srchmp(VL,int,V,P,P,P *);
1531: void srchump(int,P,P,P *);
1532: void srcr(VL,V,P,P,P *);
1533: void strtobf(char *,BF *);
1534: void subalg(Num,Num,Num *);
1535: void subbf(Num,Num,Num *);
1536: void subcplx(Num,Num,Num *);
1537: void subm2p(VL,Q,Q,P,P,P *);
1538: void subm2q(Q,Q,Q,Q,Q *);
1539: void submat(VL,MAT,MAT,MAT *);
1540: void submp(VL,int,P,P,P *);
1541: void submq(int,MQ,MQ,MQ *);
1542: void subnum(VL,Num,Num,Num *);
1543: void subp(VL,P,P,P *);
1544: void subq(Q,Q,Q *);
1545: void subr(VL,Obj,Obj,Obj *);
1546: void subreal(Num,Num,Real *);
1547: void submi(MQ,MQ,MQ *);
1548: void sublm(LM,LM,LM *);
1549: void substmp(VL,int,P,V,P,P *);
1550: void substp(VL,P,V,P,P *);
1551: void substvp(VL,P,VN,P *);
1552: void subum(int,UM,UM,UM);
1553: void subvect(VL,VECT,VECT,VECT *);
1.19 noro 1554: void subquote(VL,QUOTE,QUOTE,QUOTE *);
1.1 noro 1555: void toreim(Num,Num *,Num *);
1556: void ucsump(P,Q *);
1557: void udivpwm(Q,P,P,P *,P *);
1558: void udivpz(P,P,P *,P *);
1559: void udivpzwm(Q,P,P,P *,P *);
1560: void uexgcdnp(VL,P,P *,int,VN,Q,P *,P *,P *,P *,Q *);
1561: void uezgcd1p(P,P,P *);
1562: void uezgcdpp(DCP,P,P *);
1563: void uezgcdpz(VL,P,P,P *);
1564: void ufctr(P,int,DCP *);
1565: void ufctrmain(P,int,DCP *);
1566: void umtomp(V,UM,P *);
1567: void umtop(V,UM,P *);
1568: void usqp(P,DCP *);
1569: void vntovl(VN,int,VL *);
1570:
1571: #if 0 && !defined(VISUAL)
1572: void bzero(const void *,int);
1573: void bcopy(const void *,void *,int);
1574: char *index(char *,int);
1575: #endif
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>