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