Go to the source code of this file.
◆ crPrint()
Definition at line 25 of file number2.cc.
26{
30}
const CanonicalForm int s
char * crString(coeffs c)
void PrintS(const char *s)
◆ crString()
Definition at line 17 of file number2.cc.
18{
20 {
22 }
24}
static FORCE_INLINE char * nCoeffName(const coeffs cf)
◆ jjCRING_Zm()
Definition at line 88 of file number2.cc.
89{
91 number i2=(number)
b->Data();
93 {
95 mpz_t modBase;
97 info.base= (mpz_ptr)modBase;
99 if (mpz_popcount(modBase)==1)
100 {
101
102 mp_bitcnt_t
l=mpz_scan1 (modBase,0);
103 if ((
l>0) && (
l<=8*
sizeof(
unsigned long)))
104 {
106 }
107 else
108 {
109 mpz_set_ui(modBase,2);
112 }
113 mpz_clear(modBase);
115 }
117 mpz_clear(modBase);
119 }
121}
@ n_Znm
only used if HAVE_RINGS is defined
@ n_Zn
only used if HAVE_RINGS is defined
@ n_Z2m
only used if HAVE_RINGS is defined
@ n_Z
only used if HAVE_RINGS is defined
coeffs nInitChar(n_coeffType t, void *parameter)
one-time initialisations for new coeffs in case of an error return NULL
void nlMPZ(mpz_t m, number &n, const coeffs r)
The main handler for Singular numbers which are suitable for Singular polynomials.
◆ jjCRING_Zp()
Definition at line 35 of file number2.cc.
36{
38 unsigned long i2=(
unsigned long)
b->Data();
40 {
41 if (i2==(
unsigned long)
IsPrime(i2))
42 {
43 #ifndef TEST_ZN_AS_ZP
45 #else
47 mpz_t modBase;
48 mpz_init_set_ui(modBase,i2);
52 mpz_clear(modBase);
53 #endif
54 }
55 else
56 {
58 mpz_t modBase;
59 mpz_init_set_ui(modBase,i2);
62 if (mpz_popcount((mpz_ptr)modBase)==1)
63 {
65
66 if (i2<(8*sizeof(unsigned long)))
67 {
68 mpz_clear(modBase);
71 }
72 else
73 {
74 mpz_set_ui(modBase,2);
77 mpz_clear(modBase);
79 }
80 }
82 mpz_clear(modBase);
83 }
85 }
87}
static int SI_LOG2(int v)
◆ jjEQUAL_CR()
Definition at line 123 of file number2.cc.
124{
127 res->data=(
void*)(
long)(a2==b2);
130}
◆ jjR2_CR()
Definition at line 132 of file number2.cc.
133{
134 ring r=(ring)a->
Data();
140}
struct for passing initialization parameters to naInitChar
@ n_transExt
used for all transcendental extensions, i.e., the top-most extension in an extension tower is transce...