381 const int c = (int) (
long)
p;
392 r->npPminus1M = c - 1;
454 r->has_simple_Alloc=
TRUE;
455 r->has_simple_Inverse=
TRUE;
463 r->npInvTable=(
unsigned short*)
omAlloc0( r->ch*
sizeof(
unsigned short) );
465 #ifndef HAVE_GENERIC_MULT 466 r->npExpTable=(
unsigned short *)
omAlloc0( r->ch*
sizeof(
unsigned short) );
467 r->npLogTable=(
unsigned short *)
omAlloc0( r->ch*
sizeof(
unsigned short) );
468 r->npExpTable[0] = 1;
469 r->npLogTable[0] = 0;
475 r->npLogTable[1] = 0;
481 r->npExpTable[
i] =(int)(((
long)
w * (long)r->npExpTable[
i-1]) % r->ch);
482 r->npLogTable[r->npExpTable[
i]] =
i;
483 if ( r->npExpTable[
i] == 1 )
492 r->npExpTable[1] = 1;
493 r->npLogTable[1] = 0;
502 r->cfExactDiv =
nvDiv;
number npInit(long i, const coeffs r)
long npInt(number &n, const coeffs r)
number nvInvers(number c, const coeffs r)
number npInvers(number c, const coeffs r)
static char * npCoeffName(const coeffs cf)
number nvMult(number a, number b, const coeffs r)
void nvInpMult(number &a, number b, const coeffs r)
void npWrite(number a, const coeffs r)
number npDiv(number a, number b, const coeffs r)
BOOLEAN npEqual(number a, number b, const coeffs r)
BOOLEAN npDBTest(number a, const char *f, const int l, const coeffs r)
static number npSubM(number a, number b, const coeffs r)
static number npRandom(siRandProc p, number, number, const coeffs cf)
BOOLEAN npGreater(number a, number b, const coeffs r)
number nvDiv(number a, number b, const coeffs r)
BOOLEAN npIsMOne(number a, const coeffs r)
void npCoeffWrite(const coeffs r, BOOLEAN details)
BOOLEAN npGreaterZero(number k, const coeffs r)
static number npAddM(number a, number b, const coeffs r)
static number npReadFd(const ssiInfo *d, const coeffs)
static void npWriteFd(number n, const ssiInfo *d, const coeffs)
nMapFunc npSetMap(const coeffs src, const coeffs dst)
static FORCE_INLINE n_coeffType getCoeffType(const coeffs r)
Returns the type of coeffs domain.
number npConvFactoryNSingN(const CanonicalForm n, const coeffs r)
static void npInpAddM(number &a, number b, const coeffs r)
void npInpMult(number &a, number b, const coeffs r)
static char * npCoeffString(const coeffs cf)
number npNeg(number c, const coeffs r)
number npMult(number a, number b, const coeffs r)
CanonicalForm npConvSingNFactoryN(number n, BOOLEAN setChar, const coeffs r)
static BOOLEAN npCoeffsEqual(const coeffs r, n_coeffType n, void *parameter)
void npKillChar(coeffs r)
const char * npRead(const char *s, number *a, const coeffs r)
BOOLEAN npIsOne(number a, const coeffs r)
BOOLEAN npIsZero(number a, const coeffs r)