1 | #ifndef NUMBER2_H |
---|
2 | #define NUMBER2_H |
---|
3 | |
---|
4 | #ifdef SINGULAR_4_1 |
---|
5 | #include<libpolys/coeffs/coeffs.h> |
---|
6 | struct snumber2; |
---|
7 | typedef struct snumber2 * number2; |
---|
8 | struct snumber2 |
---|
9 | { coeffs cf; |
---|
10 | number n; |
---|
11 | }; |
---|
12 | |
---|
13 | static inline number2 n2Init(long i, coeffs c) |
---|
14 | { number2 N=(number2)omAlloc0(sizeof(snumber2)); if (c!=NULL) { N->cf=c; N->n=n_Init(i,c);} return N;} |
---|
15 | |
---|
16 | char *crString(coeffs c); |
---|
17 | |
---|
18 | void crPrint(coeffs cf); |
---|
19 | |
---|
20 | BOOLEAN jjCRING_Zp(leftv res, leftv a, leftv b); |
---|
21 | BOOLEAN jjCRING_Zm(leftv res, leftv a, leftv b); |
---|
22 | |
---|
23 | BOOLEAN jjEQUAL_CR(leftv res, leftv a, leftv b); // compare cring |
---|
24 | |
---|
25 | // type conversion: |
---|
26 | BOOLEAN jjNUMBER2CR(leftv res, leftv a, leftv b); // <any>,cring ->number2 |
---|
27 | BOOLEAN jjN2_CR(leftv res, leftv a); // number2 ->cring |
---|
28 | BOOLEAN jjCM_CR(leftv res, leftv a); // cmatrix ->cring |
---|
29 | BOOLEAN jjBIM2_CR(leftv res, leftv a); // bigint ->cring |
---|
30 | BOOLEAN jjR2_CR(leftv res, leftv a); // ring ->cring |
---|
31 | BOOLEAN jjN2_N(leftv res, leftv a); // number2 ->number |
---|
32 | |
---|
33 | // operations: |
---|
34 | BOOLEAN jjNUMBER2_OP1(leftv res, leftv a); |
---|
35 | BOOLEAN jjNUMBER2_OP2(leftv res, leftv a, leftv b); |
---|
36 | |
---|
37 | number2 n2Copy(const number2 d); |
---|
38 | void n2Delete(number2 &d); |
---|
39 | char *n2String(number2 d, BOOLEAN typed); |
---|
40 | void n2Print(number2 d); |
---|
41 | |
---|
42 | BOOLEAN jjCMATRIX_3(leftv, leftv, leftv,leftv); |
---|
43 | #endif |
---|
44 | #endif |
---|