version 1.103, 2017/09/14 01:34:54 |
version 1.107, 2018/09/04 07:03:38 |
|
|
* DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, |
* DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, |
* PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. |
* PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. |
* |
* |
* $OpenXM: OpenXM_contrib2/asir2000/include/ca.h,v 1.102 2017/08/31 02:36:21 noro Exp $ |
* $OpenXM: OpenXM_contrib2/asir2000/include/ca.h,v 1.106 2018/03/29 01:32:53 noro Exp $ |
*/ |
*/ |
#include <stdio.h> |
#include <stdio.h> |
#include <stdlib.h> |
#include <stdlib.h> |
Line 108 typedef void * pointer; |
|
Line 108 typedef void * pointer; |
|
|
|
#define NULLP ((void *)0) |
#define NULLP ((void *)0) |
|
|
#define TODO printf("%s: not implemented!\n", __func__) |
#define TODO printf("%s: not implemented!\n", __func__) |
|
|
#define COPY(a,b) ((b)=(a)) |
#define COPY(a,b) ((b)=(a)) |
#define FREEN(p) |
#define FREEN(p) |
Line 154 typedef void * pointer; |
|
Line 154 typedef void * pointer; |
|
#define N_B 3 |
#define N_B 3 |
#define N_NEXT_B (N_B) |
#define N_NEXT_B (N_B) |
#if defined(INTERVAL) |
#if defined(INTERVAL) |
#define N_Quad (N_NEXT_B+1) |
#define N_Quad (N_NEXT_B+1) |
#define N_IP (N_NEXT_B+2) |
#define N_IP (N_NEXT_B+2) |
#define N_IntervalDouble (N_NEXT_B+3) |
#define N_IntervalDouble (N_NEXT_B+3) |
#define N_IntervalQuad (N_NEXT_B+4) |
#define N_IntervalQuad (N_NEXT_B+4) |
#define N_IntervalBigFloat (N_NEXT_B+5) |
#define N_IntervalBigFloat (N_NEXT_B+5) |
#define N_PRE_C N_IntervalBigFloat |
#define N_PRE_C N_IntervalBigFloat |
#define N_BASE (N_NEXT_B+5) |
#define N_BASE (N_NEXT_B+5) |
#else |
#else |
#define N_BASE N_NEXT_B |
#define N_BASE N_NEXT_B |
Line 181 typedef void * pointer; |
|
Line 181 typedef void * pointer; |
|
#define ORD_LEX 2 |
#define ORD_LEX 2 |
|
|
typedef enum { |
typedef enum { |
A_end=0,A_fnode,A_arf,A_int,A_str,A_internal,A_node,A_notimpl,A_func |
A_end=0,A_fnode,A_arf,A_int,A_str,A_internal,A_node,A_notimpl,A_func |
} farg_type; |
} farg_type; |
|
|
#if SIZEOF_LONG == 8 |
#if SIZEOF_LONG == 8 |
Line 195 typedef _int64 L; |
|
Line 195 typedef _int64 L; |
|
typedef unsigned _int64 UL; |
typedef unsigned _int64 UL; |
#endif |
#endif |
|
|
#if defined(__GNUC__) |
#if defined(__GNUC__) && SIZEOF_LONG == 8 |
typedef __uint64_t U64; |
typedef __uint64_t U64; |
typedef __uint128_t U128; |
typedef __uint128_t U128; |
typedef __int64_t L64; |
typedef __int64_t L64; |
Line 203 typedef __int128_t L128; |
|
Line 203 typedef __int128_t L128; |
|
#endif |
#endif |
|
|
typedef struct oN { |
typedef struct oN { |
int p; |
int p; |
unsigned int b[1]; |
unsigned int b[1]; |
} *N; |
} *N; |
|
|
typedef struct oZ { |
typedef struct oZ { |
int p; |
int p; |
unsigned int b[1]; |
unsigned int b[1]; |
} *Z; |
} *Z; |
|
|
typedef struct oUP2 { |
typedef struct oUP2 { |
int w; |
int w; |
unsigned int b[1]; |
unsigned int b[1]; |
} *UP2; |
} *UP2; |
|
|
typedef struct _oUP2 { |
typedef struct _oUP2 { |
int w; |
int w; |
unsigned int *b; |
unsigned int *b; |
} *_UP2; |
} *_UP2; |
|
|
#define UP2_DENSE 0 |
#define UP2_DENSE 0 |
#define UP2_SPARSE 1 |
#define UP2_SPARSE 1 |
|
|
typedef struct oGEN_UP2 { |
typedef struct oGEN_UP2 { |
int id; |
int id; |
UP2 dense; |
UP2 dense; |
UP2 sparse; |
UP2 sparse; |
} *GEN_UP2; |
} *GEN_UP2; |
|
|
typedef struct oV { |
typedef struct oV { |
char *name; |
char *name; |
pointer attr; |
pointer attr; |
pointer priv; |
pointer priv; |
} *V; |
} *V; |
|
|
typedef struct oQ { |
typedef struct oQ { |
short id; |
short id; |
char nid; |
char nid; |
char sgn; |
char sgn; |
N nm; |
N nm; |
N dn; |
N dn; |
} *Q; |
} *Q; |
|
|
typedef struct oReal { |
typedef struct oReal { |
short id; |
short id; |
char nid; |
char nid; |
char pad; |
char pad; |
double body; |
double body; |
} *Real; |
} *Real; |
|
|
typedef struct oAlg { |
typedef struct oAlg { |
short id; |
short id; |
char nid; |
char nid; |
char pad; |
char pad; |
struct oObj *body; |
struct oObj *body; |
} *Alg; |
} *Alg; |
|
|
typedef struct oBF { |
typedef struct oBF { |
short id; |
short id; |
char nid; |
char nid; |
char pad; |
char pad; |
mpfr_t body; |
mpfr_t body; |
} *BF; |
} *BF; |
|
|
typedef struct oC { |
typedef struct oC { |
short id; |
short id; |
char nid; |
char nid; |
char pad; |
char pad; |
struct oNum *r,*i; |
struct oNum *r,*i; |
} *C; |
} *C; |
|
|
typedef struct oLM { |
typedef struct oLM { |
short id; |
short id; |
char nid; |
char nid; |
char pad; |
char pad; |
struct oN *body; |
struct oN *body; |
} *LM; |
} *LM; |
|
|
typedef struct oGF2N { |
typedef struct oGF2N { |
short id; |
short id; |
char nid; |
char nid; |
char pad; |
char pad; |
struct oUP2 *body; |
struct oUP2 *body; |
} *GF2N; |
} *GF2N; |
|
|
typedef struct oGFPN { |
typedef struct oGFPN { |
short id; |
short id; |
char nid; |
char nid; |
char pad; |
char pad; |
struct oUP *body; |
struct oUP *body; |
} *GFPN; |
} *GFPN; |
|
|
typedef struct oDAlg { |
typedef struct oDAlg { |
short id; |
short id; |
char nid; |
char nid; |
char pad; |
char pad; |
struct oDP *nm; |
struct oDP *nm; |
struct oQ *dn; |
struct oQ *dn; |
} *DAlg; |
} *DAlg; |
|
|
typedef struct oGZ { |
typedef struct oGZ { |
short id; |
short id; |
char nid; |
char nid; |
char pad; |
char pad; |
mpz_t body; |
mpz_t body; |
} *GZ; |
} *GZ; |
|
|
typedef struct oGQ { |
typedef struct oGQ { |
short id; |
short id; |
char nid; |
char nid; |
char pad; |
char pad; |
mpq_t body; |
mpq_t body; |
} *GQ; |
} *GQ; |
|
|
typedef struct oNum { |
typedef struct oNum { |
short id; |
short id; |
char nid; |
char nid; |
char pad; |
char pad; |
} *Num; |
} *Num; |
|
|
typedef struct oMQ { |
typedef struct oMQ { |
short id; |
short id; |
char nid; |
char nid; |
char pad; |
char pad; |
int cont; |
int cont; |
} *MQ; |
} *MQ; |
|
|
typedef struct oGFS { |
typedef struct oGFS { |
short id; |
short id; |
char nid; |
char nid; |
char pad; |
char pad; |
int cont; |
int cont; |
} *GFS; |
} *GFS; |
|
|
typedef struct oGFSN { |
typedef struct oGFSN { |
short id; |
short id; |
char nid; |
char nid; |
char pad; |
char pad; |
struct oUM *body; |
struct oUM *body; |
} *GFSN; |
} *GFSN; |
|
|
typedef struct oP { |
typedef struct oP { |
short id; |
short id; |
short pad; |
short pad; |
V v; |
V v; |
struct oDCP *dc; |
struct oDCP *dc; |
} *P; |
} *P; |
|
|
typedef struct oR { |
typedef struct oR { |
short id; |
short id; |
short reduced; |
short reduced; |
P nm; |
P nm; |
P dn; |
P dn; |
} *R; |
} *R; |
|
|
typedef struct oVECT { |
typedef struct oVECT { |
short id; |
short id; |
short pad; |
short pad; |
int len; |
int len; |
pointer *body; |
pointer *body; |
} *VECT; |
} *VECT; |
|
|
typedef struct oMAT { |
typedef struct oMAT { |
short id; |
short id; |
short pad; |
short pad; |
int row,col; |
int row,col; |
pointer **body; |
pointer **body; |
} *MAT; |
} *MAT; |
|
|
typedef struct oGF2MAT { |
typedef struct oGF2MAT { |
short id; |
short id; |
short pad; |
short pad; |
int row,col; |
int row,col; |
unsigned int **body; |
unsigned int **body; |
} *GF2MAT, *GFMMAT; |
} *GF2MAT, *GFMMAT; |
|
|
/* IMAT */ |
/* IMAT */ |
#define IMATCH 64 |
#define IMATCH 64 |
|
|
typedef struct oIENT { |
typedef struct oIENT { |
int cr; |
int cr; |
int row, col; |
int row, col; |
pointer *body; |
pointer *body; |
} IENT; |
} IENT; |
|
|
typedef struct oIMATC { |
typedef struct oIMATC { |
pointer *fore; |
pointer *fore; |
pointer *next; |
pointer *next; |
IENT ient[IMATCH]; |
IENT ient[IMATCH]; |
} *IMATC; |
} *IMATC; |
|
|
typedef struct oIMAT { |
typedef struct oIMAT { |
short id; |
short id; |
int row, col, clen; |
int row, col, clen; |
pointer *root; |
pointer *root; |
pointer *toor; |
pointer *toor; |
} *IMAT; |
} *IMAT; |
/* IMAT */ |
/* IMAT */ |
typedef struct oLIST { |
typedef struct oLIST { |
short id; |
short id; |
short pad; |
short pad; |
struct oNODE *body; |
struct oNODE *body; |
} *LIST; |
} *LIST; |
|
|
typedef struct oSTRING { |
typedef struct oSTRING { |
short id; |
short id; |
short pad; |
short pad; |
char *body; |
char *body; |
} *STRING; |
} *STRING; |
|
|
typedef struct oCOMP { |
typedef struct oCOMP { |
short id; |
short id; |
short type; |
short type; |
struct oObj *member[1]; |
struct oObj *member[1]; |
} *COMP; |
} *COMP; |
|
|
typedef struct oDP { |
typedef struct oDP { |
short id; |
short id; |
short nv; |
short nv; |
int sugar; |
int sugar; |
struct oMP *body; |
struct oMP *body; |
} *DP; |
} *DP; |
|
|
typedef struct oDPV { |
typedef struct oDPV { |
short id; |
short id; |
int len; |
int len; |
int sugar; |
int sugar; |
struct oDP **body; |
struct oDP **body; |
} *DPV; |
} *DPV; |
|
|
|
|
typedef struct oUSINT { |
typedef struct oUSINT { |
short id; |
short id; |
short pad; |
short pad; |
unsigned body; |
unsigned body; |
} *USINT; |
} *USINT; |
|
|
typedef struct oERR { |
typedef struct oERR { |
short id; |
short id; |
short pad; |
short pad; |
struct oObj *body; |
struct oObj *body; |
} *ERR; |
} *ERR; |
|
|
typedef struct oMATHCAP { |
typedef struct oMATHCAP { |
short id; |
short id; |
short pad; |
short pad; |
struct oLIST *body; |
struct oLIST *body; |
} *MATHCAP; |
} *MATHCAP; |
|
|
typedef struct oBYTEARRAY { |
typedef struct oBYTEARRAY { |
short id; |
short id; |
short pad; |
short pad; |
int len; |
int len; |
unsigned char *body; |
unsigned char *body; |
} *BYTEARRAY; |
} *BYTEARRAY; |
|
|
typedef struct oQUOTE { |
typedef struct oQUOTE { |
short id; |
short id; |
short pad; |
short pad; |
pointer body; |
pointer body; |
} *QUOTE; |
} *QUOTE; |
|
|
typedef struct oQUOTEARG { |
typedef struct oQUOTEARG { |
short id; |
short id; |
short pad; |
short pad; |
farg_type type; |
farg_type type; |
pointer body; |
pointer body; |
} *QUOTEARG; |
} *QUOTEARG; |
|
|
typedef struct oOPTLIST { |
typedef struct oOPTLIST { |
short id; |
short id; |
short pad; |
short pad; |
struct oNODE *body; |
struct oNODE *body; |
} *OPTLIST; |
} *OPTLIST; |
|
|
typedef struct oSYMBOL { |
typedef struct oSYMBOL { |
short id; |
short id; |
short pad; |
short pad; |
char *name; |
char *name; |
int value; |
int value; |
} *SYMBOL; |
} *SYMBOL; |
|
|
typedef struct oRANGE { |
typedef struct oRANGE { |
short id; |
short id; |
short pad; |
short pad; |
struct oObj *start,*end; |
struct oObj *start,*end; |
} *RANGE; |
} *RANGE; |
|
|
typedef struct oTB { |
typedef struct oTB { |
short id; |
short id; |
short pad; |
short pad; |
int size,next; |
int size,next; |
char **body; |
char **body; |
} *TB; |
} *TB; |
|
|
typedef struct oNBP { |
typedef struct oNBP { |
short id; |
short id; |
short pad; |
short pad; |
struct oNODE *body; |
struct oNODE *body; |
} *NBP; |
} *NBP; |
|
|
/* non-commutative bivariate monomial */ |
/* non-commutative bivariate monomial */ |
|
|
typedef struct oNBM { |
typedef struct oNBM { |
int d; |
int d; |
P c; |
P c; |
unsigned int *b; |
unsigned int *b; |
} *NBM; |
} *NBM; |
|
|
#define NEWNBM(p) ((p)=(NBM)MALLOC(sizeof(struct oNBM))) |
#define NEWNBM(p) ((p)=(NBM)MALLOC(sizeof(struct oNBM))) |
Line 522 typedef struct oNBM { |
|
Line 522 typedef struct oNBM { |
|
#define NBM_CLR(a,j) ((a)[(j)>>5]&=(~(1<<((j)&31)))) |
#define NBM_CLR(a,j) ((a)[(j)>>5]&=(~(1<<((j)&31)))) |
|
|
typedef struct oObj { |
typedef struct oObj { |
short id; |
short id; |
short pad; |
short pad; |
} *Obj; |
} *Obj; |
|
|
typedef struct oDCP { |
typedef struct oDCP { |
Q d; |
Q d; |
P c; |
P c; |
struct oDCP *next; |
struct oDCP *next; |
} *DCP; |
} *DCP; |
|
|
typedef struct oMP { |
typedef struct oMP { |
struct oDL *dl; |
struct oDL *dl; |
Obj c; |
Obj c; |
struct oMP *next; |
struct oMP *next; |
} *MP; |
} *MP; |
|
|
typedef struct oDPM { |
typedef struct oDPM { |
short id; |
short id; |
short nv; |
short nv; |
int sugar; |
int sugar; |
struct oDMM *body; |
struct oDMM *body; |
} *DPM; |
} *DPM; |
|
|
typedef struct oDMM { |
typedef struct oDMM { |
int pos; |
int pos; |
struct oDL *dl; |
struct oDL *dl; |
Obj c; |
Obj c; |
struct oDMM *next; |
struct oDMM *next; |
} *DMM; |
} *DMM; |
|
|
typedef struct oDL { |
typedef struct oDL { |
int td; |
int td; |
int d[1]; |
int d[1]; |
} *DL; |
} *DL; |
|
|
struct dp_pairs { |
struct dp_pairs { |
int dp1, dp2; |
int dp1, dp2; |
DL lcm; |
DL lcm; |
int sugar; |
int sugar; |
struct dp_pairs *next; |
struct dp_pairs *next; |
}; |
}; |
|
|
typedef struct dp_pairs *DP_pairs; |
typedef struct dp_pairs *DP_pairs; |
|
|
struct p_pair { |
struct p_pair { |
struct oUM *p0; |
struct oUM *p0; |
struct oUM *p1; |
struct oUM *p1; |
struct p_pair *next; |
struct p_pair *next; |
}; |
}; |
|
|
struct oMF { |
struct oMF { |
int m; |
int m; |
P f; |
P f; |
}; |
}; |
|
|
/* |
/* |
|
|
*/ |
*/ |
|
|
typedef struct oCDP { |
typedef struct oCDP { |
int len; |
int len; |
int psindex; |
int psindex; |
unsigned int *body; |
unsigned int *body; |
} *CDP; |
} *CDP; |
|
|
typedef struct oCM { |
typedef struct oCM { |
int index; |
int index; |
int c; |
int c; |
} *CM; |
} *CM; |
|
|
/* bucket list for DL */ |
/* bucket list for DL */ |
|
|
typedef struct oDLBUCKET { |
typedef struct oDLBUCKET { |
int td; |
int td; |
struct oNODE *body; |
struct oNODE *body; |
struct oDLBUCKET *next; |
struct oDLBUCKET *next; |
} *DLBUCKET; |
} *DLBUCKET; |
|
|
typedef struct oGeoBucket { |
typedef struct oGeoBucket { |
int m; |
int m; |
struct oNODE *body[32]; |
struct oNODE *body[32]; |
} *GeoBucket; |
} *GeoBucket; |
|
|
typedef struct oVL { |
typedef struct oVL { |
V v; |
V v; |
struct oVL *next; |
struct oVL *next; |
} *VL; |
} *VL; |
|
|
typedef struct oNODE { |
typedef struct oNODE { |
pointer body; |
pointer body; |
struct oNODE *next; |
struct oNODE *next; |
} *NODE; |
} *NODE; |
|
|
/* univariate poly over small finite field; dense */ |
/* univariate poly over small finite field; dense */ |
typedef struct oUM { |
typedef struct oUM { |
int d; |
int d; |
int c[1]; |
int c[1]; |
} *UM; |
} *UM; |
|
|
/* univariate poly with padic coeff */ |
/* univariate poly with padic coeff */ |
typedef struct oLUM { |
typedef struct oLUM { |
int d; |
int d; |
int *c[1]; |
int *c[1]; |
} *LUM; |
} *LUM; |
|
|
/* bivariate poly over small finite field; dense */ |
/* bivariate poly over small finite field; dense */ |
|
|
typedef struct oBM { |
typedef struct oBM { |
int d; |
int d; |
UM c[1]; |
UM c[1]; |
} *BM; |
} *BM; |
|
|
typedef struct oML { |
typedef struct oML { |
int n; |
int n; |
int mod; |
int mod; |
int bound; |
int bound; |
pointer c[1]; |
pointer c[1]; |
} *ML; |
} *ML; |
|
|
typedef struct oUB { |
typedef struct oUB { |
int d; |
int d; |
N c[1]; |
N c[1]; |
} *UB; |
} *UB; |
|
|
typedef struct oVN { |
typedef struct oVN { |
V v; |
V v; |
int n; |
int n; |
} *VN; |
} *VN; |
|
|
typedef struct oUP { |
typedef struct oUP { |
int d; |
int d; |
Num c[1]; |
Num c[1]; |
} *UP; |
} *UP; |
|
|
typedef struct oDUM { |
typedef struct oDUM { |
int n; |
int n; |
UM f; |
UM f; |
} *DUM; |
} *DUM; |
|
|
struct order_pair { |
struct order_pair { |
int order, length; |
int order, length; |
}; |
}; |
|
|
struct sparse_weight { |
struct sparse_weight { |
int pos, value; |
int pos, value; |
}; |
}; |
|
|
#define IS_DENSE_WEIGHT 0 |
#define IS_DENSE_WEIGHT 0 |
Line 674 struct sparse_weight { |
|
Line 674 struct sparse_weight { |
|
#define IS_BLOCK 2 |
#define IS_BLOCK 2 |
|
|
struct weight_or_block { |
struct weight_or_block { |
int type; |
int type; |
int length; |
int length; |
union { |
union { |
int *dense_weight; |
int *dense_weight; |
struct sparse_weight *sparse_weight; |
struct sparse_weight *sparse_weight; |
struct { |
struct { |
int order, start; |
int order, start; |
} block; |
} block; |
} body; |
} body; |
}; |
}; |
|
|
struct order_spec { |
struct order_spec { |
int id; |
int id; |
Obj obj; |
Obj obj; |
int nv; |
int nv; |
int ispot; /* 1 means Position over Term (Pos then Term) */ |
int ispot; /* 1 means Position over Term (Pos then Term) */ |
int pot_nelim; /* size of positions for pot-elimination order */ |
int pot_nelim; /* size of positions for pot-elimination order */ |
int *top_weight; |
int *top_weight; |
int module_rank; |
int module_rank; |
int *module_top_weight; |
int *module_top_weight; |
union { |
union { |
int simple; |
int simple; |
struct { |
struct { |
int length; |
int length; |
struct order_pair *order_pair; |
struct order_pair *order_pair; |
} block; |
} block; |
struct { |
struct { |
int row; |
int row; |
int **matrix; |
int **matrix; |
} matrix; |
} matrix; |
struct { |
struct { |
int length; |
int length; |
struct weight_or_block *w_or_b; |
struct weight_or_block *w_or_b; |
} composite; |
} composite; |
} ord; |
} ord; |
}; |
}; |
|
|
struct modorder_spec { |
struct modorder_spec { |
/* id : ORD_REVGRADLEX, ORD_GRADLEX, ORD_LEX */ |
/* id : ORD_REVGRADLEX, ORD_GRADLEX, ORD_LEX */ |
int id; |
int id; |
Obj obj; |
Obj obj; |
int len; |
int len; |
int *degree_shift; |
int *degree_shift; |
}; |
}; |
|
|
typedef struct oNumberField { |
typedef struct oNumberField { |
int n; |
int n; |
int psn; |
int psn; |
int dim; |
int dim; |
VL vl; |
VL vl; |
P *defpoly; |
P *defpoly; |
DP *mb; |
DP *mb; |
DP *ps; |
DP *ps; |
struct oDAlg *one; |
struct oDAlg *one; |
NODE ind; |
NODE ind; |
struct order_spec *spec; |
struct order_spec *spec; |
} *NumberField; |
} *NumberField; |
|
|
/* structure for cputime */ |
/* structure for cputime */ |
|
|
struct oEGT { |
struct oEGT { |
double exectime,gctime; |
double exectime,gctime; |
}; |
}; |
|
|
/* constant */ |
/* constant */ |
Line 849 bzero((char *)(p),(int)(((n)+1)*sizeof(type)))) |
|
Line 849 bzero((char *)(p),(int)(((n)+1)*sizeof(type)))) |
|
#define W_MLALLOC(d) ((ML)ALLOCA(TRUESIZE(oML,d,pointer))) |
#define W_MLALLOC(d) ((ML)ALLOCA(TRUESIZE(oML,d,pointer))) |
#define W_LUMALLOC(n,bound,p)\ |
#define W_LUMALLOC(n,bound,p)\ |
{\ |
{\ |
LUM ___q___;\ |
LUM ___q___;\ |
int ___i___,**___c___;\ |
int ___i___,**___c___;\ |
(___q___) = (LUM)ALLOCA(TRUESIZE(oLUM,(n),int *));\ |
(___q___) = (LUM)ALLOCA(TRUESIZE(oLUM,(n),int *));\ |
DEG(___q___) = n;\ |
DEG(___q___) = n;\ |
for ( ___i___ = 0, ___c___ = (int **)COEF(___q___); ___i___ <= n; ___i___++ ) {\ |
for ( ___i___ = 0, ___c___ = (int **)COEF(___q___); ___i___ <= n; ___i___++ ) {\ |
___c___[___i___] = (int *)ALLOCA(((bound)+1)*sizeof(int));\ |
___c___[___i___] = (int *)ALLOCA(((bound)+1)*sizeof(int));\ |
bzero((char *)___c___[___i___],((bound)+1)*sizeof(int));\ |
bzero((char *)___c___[___i___],((bound)+1)*sizeof(int));\ |
}\ |
}\ |
(p) = ___q___;\ |
(p) = ___q___;\ |
} |
} |
|
|
#define W_BMALLOC(dx,dy,p)\ |
#define W_BMALLOC(dx,dy,p)\ |
{\ |
{\ |
BM ___q___;\ |
BM ___q___;\ |
int ___i___;\ |
int ___i___;\ |
UM *___c___;\ |
UM *___c___;\ |
(___q___) = (BM)ALLOCA(TRUESIZE(oBM,(dy),UM));\ |
(___q___) = (BM)ALLOCA(TRUESIZE(oBM,(dy),UM));\ |
DEG(___q___) = dy;\ |
DEG(___q___) = dy;\ |
___c___ = (UM *)COEF(___q___);\ |
___c___ = (UM *)COEF(___q___);\ |
for ( ___i___ = 0; ___i___ <= dy; ___i___++ ) {\ |
for ( ___i___ = 0; ___i___ <= dy; ___i___++ ) {\ |
___c___[___i___] = W_UMALLOC(dx);\ |
___c___[___i___] = W_UMALLOC(dx);\ |
clearum(___c___[___i___],dx);\ |
clearum(___c___[___i___],dx);\ |
}\ |
}\ |
(p) = ___q___;\ |
(p) = ___q___;\ |
} |
} |
|
|
#define NEWUP2(q,w)\ |
#define NEWUP2(q,w)\ |
Line 1071 PL(NM(q))=1,BD(NM(q))[0]=(unsigned int)(n),DN(q)=0,(q) |
|
Line 1071 PL(NM(q))=1,BD(NM(q))[0]=(unsigned int)(n),DN(q)=0,(q) |
|
#define FTOIF(i) ((int)(((unsigned int)(i)|0x80000000))) |
#define FTOIF(i) ((int)(((unsigned int)(i)|0x80000000))) |
|
|
struct cdl { |
struct cdl { |
Obj c; |
Obj c; |
DL d; |
DL d; |
}; |
}; |
|
|
struct cdlm { |
struct cdlm { |
int c; |
int c; |
DL d; |
DL d; |
}; |
}; |
|
|
extern MP _mp_free_list; |
extern MP _mp_free_list; |
Line 1117 extern struct oV oVAR[]; |
|
Line 1117 extern struct oV oVAR[]; |
|
extern struct oV oPVAR[]; |
extern struct oV oPVAR[]; |
extern struct oVL oVLIST[]; |
extern struct oVL oVLIST[]; |
extern struct oVL oPVLIST[]; |
extern struct oVL oPVLIST[]; |
extern VL CO,ALG; |
extern VL CO,ALG,LASTCO; |
extern VL PVL; |
extern VL PVL; |
extern R ONER; |
extern R ONER; |
extern Q ONE; |
extern Q ONE; |
Line 1246 void gcdEuclidn(N,N,N *); |
|
Line 1246 void gcdEuclidn(N,N,N *); |
|
void GC_free(void *); |
void GC_free(void *); |
void FFT_primes(int,int *,int *,int *); |
void FFT_primes(int,int *,int *,int *); |
int FFT_pol_product(unsigned int,unsigned int *, unsigned int,unsigned int *, |
int FFT_pol_product(unsigned int,unsigned int *, unsigned int,unsigned int *, |
unsigned int *,int,unsigned int *); |
unsigned int *,int,unsigned int *); |
int FFT_pol_square(unsigned int,unsigned int *, |
int FFT_pol_square(unsigned int,unsigned int *, |
unsigned int *,int,unsigned int *); |
unsigned int *,int,unsigned int *); |
void dcptolist(DCP,LIST *); |
void dcptolist(DCP,LIST *); |
void gcdprsmp(VL,int,P,P,P *); |
void gcdprsmp(VL,int,P,P,P *); |
void mult_mod_tab(UM,int,UM *,UM,int); |
void mult_mod_tab(UM,int,UM *,UM,int); |
Line 2103 void sfbsqfr(P f,V x,V y,DCP *dcp); |
|
Line 2103 void sfbsqfr(P f,V x,V y,DCP *dcp); |
|
void sfbfctr(P f,V x,V y,int degbound,DCP *dcp); |
void sfbfctr(P f,V x,V y,int degbound,DCP *dcp); |
void sfdtest(P f,ML list,V x,V y,DCP *dcp); |
void sfdtest(P f,ML list,V x,V y,DCP *dcp); |
int sfdtestmain(VL vl,P lcg,UM lcg0,BM lcy,P csum,ML list, |
int sfdtestmain(VL vl,P lcg,UM lcg0,BM lcy,P csum,ML list, |
int k,int *in,P *fp,P *cofp); |
int k,int *in,P *fp,P *cofp); |
void const_term(P f,UM c); |
void const_term(P f,UM c); |
void const_term_sfbm(BM f,UM c); |
void const_term_sfbm(BM f,UM c); |
int sfctest(UM lcg0,BM lcy,ML list,int k,int *in); |
int sfctest(UM lcg0,BM lcy,ML list,int k,int *in); |
Line 2666 int compnbp(VL vl,NBP p1,NBP p2); |
|
Line 2666 int compnbp(VL vl,NBP p1,NBP p2); |
|
#define MPQTOGQ(g,q) \ |
#define MPQTOGQ(g,q) \ |
(!mpq_sgn(g)?((q)=0):(NEWGQ(q),BDY(q)[0]=(g)[0],(q))) |
(!mpq_sgn(g)?((q)=0):(NEWGQ(q),BDY(q)[0]=(g)[0],(q))) |
|
|
#define INTMPQ(a) (!mpz_cmp_ui(mpq_numref(a),1)) |
#define INTMPQ(a) (!mpz_cmp_ui(mpq_denref(a),1)) |
|
|
#define UNIGZ(a) ((a)&&NID(a)==N_GZ&&!mpz_cmp_ui(BDY(a),1)) |
#define UNIGZ(a) ((a)&&NID(a)==N_GZ&&!mpz_cmp_ui(BDY(a),1)) |
#define MUNIGZ(a) ((a)&&NID(a)==N_GZ&&!mpz_cmp_si(BDY(a),-1)) |
#define MUNIGZ(a) ((a)&&NID(a)==N_GZ&&!mpz_cmp_si(BDY(a),-1)) |