source: git/Singular/number2.h @ 9a6f8c1

spielwiese
Last change on this file since 9a6f8c1 was 9a6f8c1, checked in by Hans Schoenemann <hannes@…>, 9 years ago
add: Singular/nuber2.*: handling of NUMBER2, CRING etc.
  • Property mode set to 100644
File size: 1.3 KB
Line 
1#ifndef NUMBER2_H
2#define NUMBER2_H
3
4#ifdef SINGULAR_4_1
5#include<libpolys/coeffs/coeffs.h>
6struct snumber2;
7typedef struct snumber2 *   number2;
8struct snumber2
9{ coeffs cf;
10  number n;
11};
12
13static 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
16char *crString(coeffs c);
17
18void crPrint(coeffs cf);
19
20BOOLEAN jjCRING_Zp(leftv res, leftv a, leftv b);
21BOOLEAN jjCRING_Zm(leftv res, leftv a, leftv b);
22
23BOOLEAN jjEQUAL_CR(leftv res, leftv a, leftv b); // compare cring
24
25// type conversion:
26BOOLEAN jjNUMBER2CR(leftv res, leftv a, leftv b); // <any>,cring ->number2
27BOOLEAN jjN2_CR(leftv res, leftv a);              // number2 ->cring
28BOOLEAN jjCM_CR(leftv res, leftv a);              // cmatrix ->cring
29BOOLEAN jjBIM2_CR(leftv res, leftv a);              // bigint ->cring
30BOOLEAN jjR2_CR(leftv res, leftv a);              // ring ->cring
31BOOLEAN jjN2_N(leftv res, leftv a);             // number2 ->number
32
33// operations:
34BOOLEAN jjNUMBER2_OP1(leftv res, leftv a);
35BOOLEAN jjNUMBER2_OP2(leftv res, leftv a, leftv b);
36
37number2 n2Copy(const number2 d);
38void n2Delete(number2 &d);
39char *n2String(number2 d, BOOLEAN typed);
40void n2Print(number2 d);
41
42BOOLEAN jjCMATRIX_3(leftv, leftv, leftv,leftv);
43#endif
44#endif
Note: See TracBrowser for help on using the repository browser.