Loading...
Searching...
No Matches
coeffs_test.h
Go to the documentation of this file.
#include "misc/auxiliary.h"
#include "reporter/reporter.h"
#include "resources/feResource.h"
#include "coeffs/coeffs.h"
#include "coeffs/numbers.h"
// the following headers are private...
#include "coeffs/longrat.h"
#include "coeffs/gnumpfl.h"
#include "coeffs/gnumpc.h"
#include "coeffs/shortfl.h"
#include "coeffs/ffields.h"
#include "coeffs/modulop.h"
#include "coeffs/rmodulon.h"
#include "coeffs/rmodulo2m.h"
#include "coeffs/rintegers.h"
#include "common.h"
using namespace std;
void TestSum(const coeffs r, const unsigned long N)
{
clog << ( _2S("TEST: sum[0..") + _2S(N) + "]: ");
clog << endl;
assume( N > 0 ); // just for now...
const unsigned long ssss = (N * (N+1)) / 2;
number sum1 = n_Init(ssss, r);
clog<< "N*(N+1)/2 (int: " << ssss << "): "; PrintSized(sum1, r);
number s, ss, i, res;
s = n_Init(N , r);
i = n_Init(N+1, r);
n_InpMult(s, i, r);
n_Delete(&i, r);
clog<< "N*(N+1): ("<< N*(N+1) << ")"; PrintSized(s, r);
i = n_Init(2, r);
clog<< "2: "; PrintSized(i, r);
if( !n_IsZero( i, r) )
{
#ifdef HAVE_RINGS
TS_ASSERT( n_DivBy(s, i, r) );
#endif
res = n_Div(s, i, r);
clog<< "N*(N+1)/2: "; PrintSized(res, r);
number d = n_Sub(res, sum1, r);
TS_ASSERT( n_IsZeroDivisor(d, r) );
n_Delete(&d, r);
if( n_GetChar(r) == 0 )
{
TS_ASSERT( n_Equal(sum1, res, r) );
TS_ASSERT( n_Equal(res, sum1, r) );
}
} else
TS_ASSERT_EQUALS( n_GetChar(r), 2);
n_Delete(&s, r); n_Delete(&i, r);
n_Delete(&sum1, r); n_Delete(&res, r);
s = n_Init(0 , r);
ss = n_Init(0 , r);
for( int k = N; k >= 0; k-- )
{
i = n_Init(k, r);
n_InpAdd(s, i, r); // s += i
i = n_InpNeg(i, r);
n_InpAdd(ss, i, r); // ss -= i
n_Delete(&i, r);
}
clog<< "ss: "; PrintSized(ss, r);
ss = n_InpNeg(ss, r); // ss = -ss
clog<< "real sum : "; PrintSized(s, r);
clog<< "real sum(--): "; PrintSized(ss, r);
TS_ASSERT( n_Equal(s, ss, r) );
TS_ASSERT( n_Equal(ss, s, r) );
n_Delete(&s, r);
n_Delete(&ss, r);
clog << ( " >>> TEST DONE!" );
clog << endl;
}
void TestArith(const coeffs r)
{
clog << ("TEST: Simple Arithmetics: ");
clog << endl;
number two = n_Init(2, r);
number t = n_Init(1, r);
n_InpAdd(t, t, r);
TS_ASSERT( n_Equal(two, t, r) );
n_Delete(&t, r);
if( getCoeffType(r) == n_Q )
{
number t = n_Init(1, r);
n_InpAdd(t, t, r);
TS_ASSERT( n_Equal(two, t, r) );
n_Delete(&t, r);
}
const int N = 66666;
number a = n_Init(N, r);
clog<< "a: "; PrintSized(a, r);
clog<< "two: "; PrintSized(two, r);
number aa0 = n_Init(N*2, r);
number aa = n_Add(a, a, r);
clog<< "aa = a + a: "; PrintSized(aa, r);
number aa2 = n_Mult(a, two, r);
clog<< "aa2 = a * 2: "; PrintSized(aa2, r);
number aa1 = n_Mult(two, a, r);
clog<< "aa1 = 2 * a: "; PrintSized(aa1, r);
n_Delete(&a, r);
n_Delete(&two, r);
a = n_Sub( aa, aa1, r );
clog<< "a = aa - aa1: "; PrintSized(a, r);
TS_ASSERT( n_IsZero(a, r) );
n_Delete(&a, r);
a = n_Sub( aa, aa2, r );
clog<< "a = aa - aa2: "; PrintSized(a, r);
TS_ASSERT( n_IsZero(a, r) );
n_Delete(&a, r);
a = n_Sub( aa1, aa2, r );
clog<< "a = aa1 - aa2: "; PrintSized(a, r);
TS_ASSERT( n_IsZero(a, r) );
n_Delete(&a, r);
TS_ASSERT( n_Equal(aa, aa1, r) );
TS_ASSERT( n_Equal(aa, aa2, r) );
TS_ASSERT( n_Equal(aa1, aa2, r) );
TS_ASSERT( n_Equal(aa0, aa, r) );
TS_ASSERT( n_Equal(aa0, aa1, r) );
TS_ASSERT( n_Equal(aa0, aa2, r) );
n_Delete(&aa, r);
n_Delete(&aa1, r);
n_Delete(&aa2, r);
n_Delete(&aa0, r);
clog << ( " >>> TEST DONE!" );
clog << endl;
}
BOOLEAN Test(const n_coeffType type, void* p = NULLp)
{
clog << endl;
clog << ( "----------------------- Testing coeffs: [" + _2S(type) + ", " + _2S(p) + "]: -----------------------");
clog << endl;
const coeffs r = nInitChar( type, p );
if( r == NULLp )
{
clog << ( "Test: could not get this coeff. domain" );
return FALSE;
};
TS_ASSERT_DIFFERS( r->cfCoeffWrite, NULLp );
if( r->cfCoeffWrite != NULL )
{
clog << "Coeff-domain: " << endl;
n_CoeffWrite(r); PrintLn();
}
if (n_NumberOfParameters(r) > 0)
{
number z = n_Param(1, r); // also any integer instead of 0//?
PrintS("Parameter: "); PrintSized(z, r);
n_Delete(&z, r);
}
clog << "Char: " << n_GetChar(r) << endl;
TS_ASSERT_DIFFERS( r, NULLp );
nSetChar( r );
TS_ASSERT_EQUALS( getCoeffType(r), type );
TS_ASSERT_DIFFERS( r->cfInit, NULLp );
TS_ASSERT_DIFFERS( r->cfWriteLong, NULLp );
TS_ASSERT_DIFFERS( r->cfAdd, NULLp );
TS_ASSERT_DIFFERS( r->cfDelete, NULLp );
switch( type )
{
case n_Q:
{
//TS_ASSERT_EQUALS( r->cfInit, nlInit );
//TS_ASSERT_EQUALS( r->cfAdd, nlAdd );
//TS_ASSERT_EQUALS( r->cfDelete, nlDelete );
TS_ASSERT( nCoeff_is_Q( r ));
TS_ASSERT( nCoeff_is_Domain( r ));
TS_ASSERT( !nCoeff_has_Units( r )); // ?
TS_ASSERT( !nCoeff_has_simple_inverse( r ));// ?
TS_ASSERT( !nCoeff_has_simple_Alloc( r )); // ?
TS_ASSERT( !nCoeff_is_Ring_2toM( r ));
TS_ASSERT( !nCoeff_is_Zn( r ));
TS_ASSERT( !nCoeff_is_Ring_PtoM( r ));
TS_ASSERT( !nCoeff_is_Z( r ));
TS_ASSERT( !nCoeff_is_Ring( r ));
TS_ASSERT( !nCoeff_is_Zp( r ));
TS_ASSERT( !nCoeff_is_numeric( r ));
TS_ASSERT( !nCoeff_is_R( r ));
TS_ASSERT( !nCoeff_is_GF( r ));
TS_ASSERT( !nCoeff_is_long_R( r ));
TS_ASSERT( !nCoeff_is_long_C( r ));
TS_ASSERT( !nCoeff_is_CF( r ));
TS_ASSERT( !nCoeff_is_Extension( r ));
break;
}
case n_long_R:
{
//TS_ASSERT_EQUALS( r->cfInit, ngfInit );
//TS_ASSERT_EQUALS( r->cfAdd, ngfAdd );
//TS_ASSERT_EQUALS( r->cfDelete, ngfDelete );
break;
}
case n_long_C:
{
// TS_ASSERT_EQUALS( r->cfInit, ngcInit );
// TS_ASSERT_EQUALS( r->cfAdd, ngcAdd );
// TS_ASSERT_EQUALS( r->cfDelete, ngcDelete );
break;
}
case n_R:
{
//TS_ASSERT_EQUALS( r->cfInit, nrInit );
//TS_ASSERT_EQUALS( r->cfAdd, nrAdd );
// TS_ASSERT_EQUALS( r->cfDelete, nrDelete ); // No?
break;
}
case n_GF:
{
// TS_ASSERT_EQUALS( r->cfInit, nfInit );
// TS_ASSERT_EQUALS( r->cfAdd, nfAdd );
//TS_ASSERT_EQUALS( r->cfDelete, nfDelete );
break;
}
#ifdef HAVE_RINGS
case n_Z2m:
{
//TS_ASSERT_EQUALS( r->cfInit, nr2mInit );
//TS_ASSERT_EQUALS( r->cfAdd, nr2mAdd );
//TS_ASSERT_EQUALS( r->cfDelete, ndDelete );
break;
}
case n_Zn:
{
//TS_ASSERT_EQUALS( r->cfInit, nrnInit );
//TS_ASSERT_EQUALS( r->cfAdd, nrnAdd );
//TS_ASSERT_EQUALS( r->cfDelete, nrnDelete );
break;
}
#endif
default:
{
// ...
}
}
TestArith( r );
TestSum( r, 10 );
TestSum( r, 100 );
TestSum( r, 101 );
TestSum( r, 1001 );
TestSum( r, 9000 );
nKillChar( r );
return TRUE;
}
// We can rely on this file being included exactly once
// and declare this global variable in the header file.
//
static GlobalPrintingFixture globalPrintingFixture;
class CoeffsTestSuite : public CxxTest::TestSuite
{
public:
// void test_dummy() { float fnum = 2.00001f; TS_ASSERT_DELTA (fnum, 2.0f, 0.0001f); }
void test_Z2m4()
{
#ifdef HAVE_RINGS
n_coeffType type = n_Z2m;
TS_ASSERT( Test(type, (void*) 4) );
#endif
}
void test_Zp101()
{
n_coeffType type = n_Zp;
TS_ASSERT( Test(type, (void*) 101) );
}
void test_Z2m8()
{
#ifdef HAVE_RINGS
n_coeffType type = n_Z2m;
TS_ASSERT( Test(type, (void*) 8) );
#endif
}
void simple(const n_coeffType _type)
{
n_coeffType type = _type;
TS_ASSERT( type == _type ); // ?
TS_ASSERT( Test(type) );
}
void test_Q()
{
simple(n_Q);
}
void test_R()
{
simple(n_R);
}
void test_Z()
{
#ifdef HAVE_RINGS
simple(n_Z); // No need in GMP?
#endif
}
void test_GF_toobig()
{
n_coeffType type = n_GF;
GFInfo param;
param.GFChar= 5;
param.GFDegree= 12;
param.GFPar_name= (const char*)"q";
TS_ASSERT( !Test(type, (void*) &param) );
// it should not be used by numbers... right?
// TODO: what is our policy wrt param-pointer-ownership?
}
void test_GF()
{
// TODO: what if it was already registered?
// Q: no way to deRegister a type?
n_coeffType type = n_GF;
GFInfo param;
param.GFChar= 5;
param.GFDegree= 2;
param.GFPar_name= (const char*)"Q";
TS_ASSERT( Test(type, (void*) &param) );
// it should not be used by numbers... right?
// TODO: what is our policy wrt param-pointer-ownership?
}
void test_Zn3()
{
#ifdef HAVE_RINGS
n_coeffType type = n_Zn;
ZnmInfo Znmparam;
Znmparam.base= (mpz_ptr) omAlloc (sizeof (mpz_t));
mpz_init_set_ui (Znmparam.base, 3);
Znmparam.exp= 1;
TS_ASSERT( Test(type, (void*) &Znmparam) );
#endif
}
void test_Z2m2()
{
#ifdef HAVE_RINGS
n_coeffType type = n_Z2m;
TS_ASSERT( Test(type, (void*) 2) );
#endif
}
void test_LR()
{
simple(n_long_R);
}
void test_LC()
{
simple(n_long_C);
}
void test_Q_special()
{
const coeffs cf = nInitChar(n_Q, NULLp);
if (cf == NULLp)
clog << ( "Test: could not get this coeff. domain" );
TS_ASSERT_DIFFERS(cf->cfCoeffWrite, NULLp);
if (cf->cfCoeffWrite != NULL )
{
clog << "Coeff-domain: " << endl;
n_CoeffWrite(cf); PrintLn();
}
number q1 = n_Init(21, cf);
number q2 = n_Init(2, cf);
number q3 = n_Div(q1, q2, cf);
number q4 = n_Init(30, cf);
number q5 = n_Mult(q3, q4, cf);
TS_ASSERT(n_Test(q5, cf));
Print("21/2 * 30 = %ld\n", n_Int(q5, cf));
TS_ASSERT(n_Test(q5, cf));
n_Delete(&q1, cf);
n_Delete(&q2, cf);
n_Delete(&q3, cf);
n_Delete(&q4, cf);
n_Delete(&q5, cf);
}
};
TS_ASSERT_EQUALS
#define TS_ASSERT_EQUALS(x, y)
Definition TestSuite.h:255
TS_ASSERT_DIFFERS
#define TS_ASSERT_DIFFERS(x, y)
Definition TestSuite.h:287
TS_ASSERT
#define TS_ASSERT(e)
Definition TestSuite.h:239
auxiliary.h
All the auxiliary stuff.
BOOLEAN
int BOOLEAN
Definition auxiliary.h:88
TRUE
#define TRUE
Definition auxiliary.h:101
FALSE
#define FALSE
Definition auxiliary.h:97
NULLp
#define NULLp
Definition auxiliary.h:109
N
const CanonicalForm CFMap CFMap & N
Definition cfEzgcd.cc:56
i
int i
Definition cfEzgcd.cc:132
k
int k
Definition cfEzgcd.cc:99
p
int p
Definition cfModGcd.cc:4086
cf
CanonicalForm cf
Definition cfModGcd.cc:4091
CoeffsTestSuite
Definition coeffs_test.h:354
CoeffsTestSuite::test_Zp101
void test_Zp101()
Definition coeffs_test.h:366
CoeffsTestSuite::test_Z2m2
void test_Z2m2()
Definition coeffs_test.h:455
CoeffsTestSuite::test_GF_toobig
void test_GF_toobig()
Definition coeffs_test.h:406
CoeffsTestSuite::test_LC
void test_LC()
Definition coeffs_test.h:469
CoeffsTestSuite::simple
void simple(const n_coeffType _type)
Definition coeffs_test.h:380
CoeffsTestSuite::test_R
void test_R()
Definition coeffs_test.h:392
CoeffsTestSuite::test_LR
void test_LR()
Definition coeffs_test.h:464
CoeffsTestSuite::test_Z2m4
void test_Z2m4()
Definition coeffs_test.h:358
CoeffsTestSuite::test_Q_special
void test_Q_special()
Definition coeffs_test.h:474
CoeffsTestSuite::test_Q
void test_Q()
Definition coeffs_test.h:387
CoeffsTestSuite::test_Z
void test_Z()
Definition coeffs_test.h:398
CoeffsTestSuite::test_Z2m8
void test_Z2m8()
Definition coeffs_test.h:372
CoeffsTestSuite::test_GF
void test_GF()
Definition coeffs_test.h:422
CoeffsTestSuite::test_Zn3
void test_Zn3()
Definition coeffs_test.h:441
CxxTest::TestSuite
Definition TestSuite.h:22
GlobalPrintingFixture
Definition common.h:91
coeffs.h
Coefficient rings, fields and other domains suitable for Singular polynomials.
n_Mult
static FORCE_INLINE number n_Mult(number a, number b, const coeffs r)
return the product of 'a' and 'b', i.e., a*b
Definition coeffs.h:639
n_Param
static FORCE_INLINE number n_Param(const int iParameter, const coeffs r)
return the (iParameter^th) parameter as a NEW number NOTE: parameter numbering: 1....
Definition coeffs.h:778
n_Int
static FORCE_INLINE long n_Int(number &n, const coeffs r)
conversion of n to an int; 0 if not possible in Z/pZ: the representing int lying in (-p/2 ....
Definition coeffs.h:550
n_Add
static FORCE_INLINE number n_Add(number a, number b, const coeffs r)
return the sum of 'a' and 'b', i.e., a+b
Definition coeffs.h:653
nCoeff_has_Units
static FORCE_INLINE BOOLEAN nCoeff_has_Units(const coeffs r)
returns TRUE, if r is not a field and r has non-trivial units
Definition coeffs.h:792
n_CoeffWrite
static FORCE_INLINE void n_CoeffWrite(const coeffs r, BOOLEAN details=TRUE)
output the coeff description
Definition coeffs.h:722
nCoeff_is_GF
static FORCE_INLINE BOOLEAN nCoeff_is_GF(const coeffs r)
Definition coeffs.h:834
nCoeff_is_Z
static FORCE_INLINE BOOLEAN nCoeff_is_Z(const coeffs r)
Definition coeffs.h:811
nCoeff_is_Extension
static FORCE_INLINE BOOLEAN nCoeff_is_Extension(const coeffs r)
Definition coeffs.h:841
nCoeff_is_long_R
static FORCE_INLINE BOOLEAN nCoeff_is_long_R(const coeffs r)
Definition coeffs.h:886
GFInfo::GFDegree
int GFDegree
Definition coeffs.h:102
n_Test
#define n_Test(a, r)
BOOLEAN n_Test(number a, const coeffs r).
Definition coeffs.h:715
nCoeff_is_Ring_PtoM
static FORCE_INLINE BOOLEAN nCoeff_is_Ring_PtoM(const coeffs r)
Definition coeffs.h:729
n_coeffType
n_coeffType
Definition coeffs.h:27
n_R
@ n_R
single prescision (6,6) real numbers
Definition coeffs.h:31
n_GF
@ n_GF
\GF{p^n < 2^16}
Definition coeffs.h:32
n_Q
@ n_Q
rational (GMP) numbers
Definition coeffs.h:30
n_Zn
@ n_Zn
only used if HAVE_RINGS is defined
Definition coeffs.h:44
n_long_R
@ n_long_R
real floating point (GMP) numbers
Definition coeffs.h:33
n_Z2m
@ n_Z2m
only used if HAVE_RINGS is defined
Definition coeffs.h:46
n_Zp
@ n_Zp
\F{p < 2^31}
Definition coeffs.h:29
n_Z
@ n_Z
only used if HAVE_RINGS is defined
Definition coeffs.h:43
n_long_C
@ n_long_C
complex floating point (GMP) numbers
Definition coeffs.h:41
nCoeff_is_CF
static FORCE_INLINE BOOLEAN nCoeff_is_CF(const coeffs r)
Definition coeffs.h:892
nCoeff_is_numeric
static FORCE_INLINE BOOLEAN nCoeff_is_numeric(const coeffs r)
Definition coeffs.h:827
nCoeff_is_Domain
static FORCE_INLINE BOOLEAN nCoeff_is_Domain(const coeffs r)
returns TRUE, if r is a field or r has no zero divisors (i.e is a domain)
Definition coeffs.h:736
n_InpNeg
static FORCE_INLINE number n_InpNeg(number n, const coeffs r)
in-place negation of n MUST BE USED: n = n_InpNeg(n) (no copy is returned)
Definition coeffs.h:560
nCoeff_has_simple_inverse
static FORCE_INLINE BOOLEAN nCoeff_has_simple_inverse(const coeffs r)
TRUE, if the computation of the inverse is fast, i.e. prefer leading coeff. 1 over content.
Definition coeffs.h:897
n_Div
static FORCE_INLINE number n_Div(number a, number b, const coeffs r)
return the quotient of 'a' and 'b', i.e., a/b; raises an error if 'b' is not invertible in r exceptio...
Definition coeffs.h:618
nCoeff_is_Q
static FORCE_INLINE BOOLEAN nCoeff_is_Q(const coeffs r)
Definition coeffs.h:801
nInitChar
coeffs nInitChar(n_coeffType t, void *parameter)
one-time initialisations for new coeffs in case of an error return NULL
Definition numbers.cc:412
nSetChar
static FORCE_INLINE void nSetChar(const coeffs r)
initialisations after each ring change
Definition coeffs.h:446
n_IsZero
static FORCE_INLINE BOOLEAN n_IsZero(number n, const coeffs r)
TRUE iff 'n' represents the zero element.
Definition coeffs.h:470
nCoeff_has_simple_Alloc
static FORCE_INLINE BOOLEAN nCoeff_has_simple_Alloc(const coeffs r)
TRUE if n_Delete is empty operation.
Definition coeffs.h:901
n_Sub
static FORCE_INLINE number n_Sub(number a, number b, const coeffs r)
return the difference of 'a' and 'b', i.e., a-b
Definition coeffs.h:658
nCoeff_is_Ring
static FORCE_INLINE BOOLEAN nCoeff_is_Ring(const coeffs r)
Definition coeffs.h:732
getCoeffType
static FORCE_INLINE n_coeffType getCoeffType(const coeffs r)
Returns the type of coeffs domain.
Definition coeffs.h:431
n_GetChar
static FORCE_INLINE int n_GetChar(const coeffs r)
Return the characteristic of the coeff. domain.
Definition coeffs.h:450
n_Delete
static FORCE_INLINE void n_Delete(number *p, const coeffs r)
delete 'p'
Definition coeffs.h:461
nCoeff_is_Zn
static FORCE_INLINE BOOLEAN nCoeff_is_Zn(const coeffs r)
Definition coeffs.h:821
n_NumberOfParameters
static FORCE_INLINE int n_NumberOfParameters(const coeffs r)
Returns the number of parameters.
Definition coeffs.h:769
nCoeff_is_Zp
static FORCE_INLINE BOOLEAN nCoeff_is_Zp(const coeffs r)
Definition coeffs.h:795
n_Init
static FORCE_INLINE number n_Init(long i, const coeffs r)
a number representing i in the given coeff field/ring r
Definition coeffs.h:541
nCoeff_is_Ring_2toM
static FORCE_INLINE BOOLEAN nCoeff_is_Ring_2toM(const coeffs r)
Definition coeffs.h:726
n_DivBy
static FORCE_INLINE BOOLEAN n_DivBy(number a, number b, const coeffs r)
test whether 'a' is divisible 'b'; for r encoding a field: TRUE iff 'b' does not represent zero in Z:...
Definition coeffs.h:750
n_InpMult
static FORCE_INLINE void n_InpMult(number &a, number b, const coeffs r)
multiplication of 'a' and 'b'; replacement of 'a' by the product a*b
Definition coeffs.h:644
n_Equal
static FORCE_INLINE BOOLEAN n_Equal(number a, number b, const coeffs r)
TRUE iff 'a' and 'b' represent the same number; they may have different representations.
Definition coeffs.h:466
nCoeff_is_R
static FORCE_INLINE BOOLEAN nCoeff_is_R(const coeffs r)
Definition coeffs.h:831
GFInfo::GFPar_name
const char * GFPar_name
Definition coeffs.h:103
nCoeff_is_long_C
static FORCE_INLINE BOOLEAN nCoeff_is_long_C(const coeffs r)
Definition coeffs.h:889
GFInfo::GFChar
int GFChar
Definition coeffs.h:101
nKillChar
void nKillChar(coeffs r)
undo all initialisations
Definition numbers.cc:563
n_InpAdd
static FORCE_INLINE void n_InpAdd(number &a, number b, const coeffs r)
addition of 'a' and 'b'; replacement of 'a' by the sum a+b
Definition coeffs.h:649
GFInfo
Creation data needed for finite fields.
Definition coeffs.h:100
TestArith
void TestArith(const coeffs r)
Definition coeffs_test.h:109
TestSum
void TestSum(const coeffs r, const unsigned long N)
Definition coeffs_test.h:25
globalPrintingFixture
static GlobalPrintingFixture globalPrintingFixture
Definition coeffs_test.h:350
Test
BOOLEAN Test(const n_coeffType type, void *p=NULLp)
Definition coeffs_test.h:209
common.h
Print
#define Print
Definition emacs.cc:80
s
const CanonicalForm int s
Definition facAbsFact.cc:51
res
CanonicalForm res
Definition facAbsFact.cc:60
feResource.h
ffields.h
gnumpc.h
gnumpfl.h
longrat.h
assume
#define assume(x)
Definition mod2.h:389
modulop.h
coeffs
The main handler for Singular numbers which are suitable for Singular polynomials.
n_IsZeroDivisor
BOOLEAN n_IsZeroDivisor(number a, const coeffs r)
Test whether a is a zero divisor in r i.e. not coprime with char. of r very inefficient implementatio...
Definition numbers.cc:177
numbers.h
omAlloc
#define omAlloc(size)
Definition omAllocDecl.h:210
NULL
#define NULL
Definition omList.c:12
PrintS
void PrintS(const char *s)
Definition reporter.cc:288
PrintLn
void PrintLn()
Definition reporter.cc:314
reporter.h
rintegers.h
rmodulo2m.h
rmodulon.h
ZnmInfo::base
mpz_ptr base
Definition rmodulon.h:17
ZnmInfo::exp
unsigned long exp
Definition rmodulon.h:17
ZnmInfo
Definition rmodulon.h:17
shortfl.h