Changeset c7ae4d in git for Singular/number2.h
- Timestamp:
- Aug 31, 2016, 12:30:31 AM (8 years ago)
- Branches:
- (u'spielwiese', '17f1d200f27c5bd38f5dfc6e8a0879242279d1d8')
- Children:
- e180f5613c396d33aa3316cd450d3a1e80d69129
- Parents:
- 7e2307f3485ab92e550254c1212dafc2940b41ea
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/number2.h
r7e2307 rc7ae4d 9 9 #include <kernel/structs.h> 10 10 struct snumber2; 11 struct spoly2; 11 12 typedef struct snumber2 * number2; 13 typedef struct spoly2 * poly2; 12 14 struct snumber2 13 15 { coeffs cf; … … 15 17 }; 16 18 19 struct spoly2 20 { ring cf; 21 poly n; 22 }; 23 17 24 static inline number2 n2Init(long i, coeffs c) 18 25 { number2 N=(number2)omAlloc0(sizeof(snumber2)); if (c!=NULL) { N->cf=c; N->n=n_Init(i,c);} return N;} 26 27 static inline poly2 p2Init(long i, ring c) 28 { poly2 N=(poly2)omAlloc0(sizeof(spoly2)); if (c!=NULL) { N->cf=c; N->n=p_ISet(i,c);} return N;} 19 29 20 30 char *crString(coeffs c); … … 31 41 BOOLEAN jjN2_CR(leftv res, leftv a); // number2 ->cring 32 42 BOOLEAN jjCM_CR(leftv res, leftv a); // cmatrix ->cring 33 BOOLEAN jjBIM2_CR(leftv res, leftv a); 43 BOOLEAN jjBIM2_CR(leftv res, leftv a); // bigint ->cring 34 44 BOOLEAN jjR2_CR(leftv res, leftv a); // ring ->cring 35 BOOLEAN jjN2_N(leftv res, leftv a); // number2 ->number36 45 BOOLEAN jjN2_N(leftv res, leftv a); // number2 ->number 46 BOOLEAN jjP2_R(leftv res, leftv a); // poly2 ->ring 37 47 // operations: 38 48 BOOLEAN jjNUMBER2_OP1(leftv res, leftv a); 39 49 BOOLEAN jjNUMBER2_OP2(leftv res, leftv a, leftv b); 50 BOOLEAN jjNUMBER2_POW(leftv res, leftv a, leftv b); 51 BOOLEAN jjPOLY2_OP1(leftv res, leftv a); 52 BOOLEAN jjPOLY2_OP2(leftv res, leftv a, leftv b); 53 BOOLEAN jjPOLY2_POW(leftv res, leftv a, leftv b); 40 54 41 55 number2 n2Copy(const number2 d); … … 44 58 void n2Print(number2 d); 45 59 60 poly2 p2Copy(const poly2 d); 61 void p2Delete(poly2 &d); 62 char *p2String(poly2 d, BOOLEAN typed); 63 void p2Print(poly2 d); 64 46 65 BOOLEAN jjCMATRIX_3(leftv, leftv, leftv,leftv); 47 66 #endif
Note: See TracChangeset
for help on using the changeset viewer.