Loading...
Searching...
No Matches
coeffs.h File Reference

Coefficient rings, fields and other domains suitable for Singular polynomials. More...

`#include "misc/auxiliary.h"`
`#include "omalloc/omalloc.h"`
`#include "misc/sirandom.h"`
`#include "reporter/reporter.h"`
`#include "reporter/s_buff.h"`
`#include "factory/factory.h"`
`#include "coeffs/si_gmp.h"`
`#include "coeffs/Enumerator.h"`

Go to the source code of this file.

## Data Structures

struct | GFInfo
| Creation data needed for finite fields. More...
struct | LongComplexInfo
struct | coeffs

## Macros

#define | FREE_RNUMBER(x)
#define | ALLOC_RNUMBER()
#define | ALLOC0_RNUMBER()
#define | n_Test(a, r)
| BOOLEAN n_Test(number a, const coeffs r).

## Typedefs

typedef number(* | numberfunc) (number a, number b, const coeffs r)
typedef number(* | nMapFunc) (number a, const coeffs src, const coeffs dst)
| maps "a", which lives in src, into dst
typedef IEnumerator< number > | ICoeffsEnumerator
| Abstract interface for an enumerator of number coefficients for an object, e.g. a polynomial.
typedef void(* | nCoeffsEnumeratorFunc) (ICoeffsEnumerator &numberCollectionEnumerator, number &output, const coeffs r)
| goes over coeffs given by the ICoeffsEnumerator and changes them. Additionally returns a number;

## Enumerations

enum | n_coeffType { n_unknown =0 , n_Zp =1 , n_Q =2 , n_R =3 , n_GF =4 , n_long_R =5 , n_polyExt =6 , n_algExt =7 , n_transExt =8 , n_long_C =9 , n_nTupel =10 , n_Z =11 , n_Zn =12 , n_Znm =13 , n_Z2m =14 , n_FlintQrat =15 , n_CF =16 , n_Nemo_AnticNumberField =17 , n_Nemo_QQField =18 , n_Nemo_ZZRing =19 , n_Nemo_FqPolyRepField =20 , n_Nemo_fqPolyRepField =21 , n_Nemo_Field =22 , n_Nemo_Ring =23 }
enum | n_coeffRep { n_rep_unknown =0 , n_rep_int , n_rep_gap_rat , n_rep_gap_gmp , n_rep_poly , n_rep_rat_fct , n_rep_gmp , n_rep_float , n_rep_gmp_float , n_rep_gmp_complex , n_rep_gf }

## Functions

static FORCE_INLINE n_coeffType | getCoeffType (const coeffs r)
| Returns the type of coeffs domain.
coeffs | nInitChar (n_coeffType t, void *parameter)
| one-time initialisations for new coeffs in case of an error return NULL
static FORCE_INLINE coeffs | nCopyCoeff (const coeffs r)
| "copy" coeffs, i.e. increment ref
void | nKillChar (coeffs r)
| undo all initialisations
static FORCE_INLINE void | nSetChar (const coeffs r)
| initialisations after each ring change
static FORCE_INLINE int | n_GetChar (const coeffs r)
| Return the characteristic of the coeff. domain.
static FORCE_INLINE number | n_Copy (number n, const coeffs r)
| return a copy of 'n'
static FORCE_INLINE void | n_Delete (number *p, const coeffs r)
| delete 'p'
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.
static FORCE_INLINE BOOLEAN | n_IsZero (number n, const coeffs r)
| TRUE iff 'n' represents the zero element.
static FORCE_INLINE BOOLEAN | n_IsOne (number n, const coeffs r)
| TRUE iff 'n' represents the one element.
static FORCE_INLINE BOOLEAN | n_IsMOne (number n, const coeffs r)
| TRUE iff 'n' represents the additive inverse of the one element, i.e. -1.
static FORCE_INLINE BOOLEAN | n_GreaterZero (number n, const coeffs r)

ordered fields: TRUE iff 'n' is positive; in Z/pZ: TRUE iff 0 < m <= roundedBelow(p/2), where m is the long representing n in C: TRUE iff (Im(n) != 0 and Im(n) >= 0) or (Im(n) == 0 and Re(n) >= 0) in K(a)/<p(a)>: TRUE iff (n != 0 and (LC(n) > 0 or deg(n) > 0)) in K(t_1, ..., t_n): TRUE iff (LC(numerator(n) is a constant and > 0) or (LC(numerator(n) is not a constant) in Z/2^kZ: TRUE iff 0 < n <= 2^(k-1) in Z/mZ: TRUE iff the internal mpz is greater than zero in Z: TRUE iff n > 0

static FORCE_INLINE BOOLEAN | n_Greater (number a, number b, const coeffs r)
| ordered fields: TRUE iff 'a' is larger than 'b'; in Z/pZ: TRUE iff la > lb, where la and lb are the long's representing
static FORCE_INLINE BOOLEAN | n_IsUnit (number n, const coeffs r)
| TRUE iff n has a multiplicative inverse in the given coeff field/ring r.
static FORCE_INLINE coeffs | n_CoeffRingQuot1 (number c, const coeffs r)
static FORCE_INLINE int | n_DivComp (number a, number b, const coeffs r)
static FORCE_INLINE number | n_GetUnit (number n, const coeffs r)
| in Z: 1 in Z/kZ (where k is not a prime): largest divisor of n (taken in Z) that is co-prime with k in Z/2^kZ: largest odd divisor of n (taken in Z) other cases: not implemented
static FORCE_INLINE number | n_Init (long i, const coeffs r)
| a number representing i in the given coeff field/ring r
static FORCE_INLINE number | n_InitMPZ (mpz_t n, const coeffs r)
| conversion of a GMP integer to number
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 .. p/2]
static FORCE_INLINE void | n_MPZ (mpz_t result, number &n, const coeffs r)
| conversion of n to a GMP integer; 0 if not possible
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)
static FORCE_INLINE number | n_Invers (number a, const coeffs r)
| return the multiplicative inverse of 'a'; raise an error if 'a' is not invertible
static FORCE_INLINE int | n_Size (number n, const coeffs r)
| return a non-negative measure for the complexity of n; return 0 only when n represents zero; (used for pivot strategies in matrix computations with entries from r)
static FORCE_INLINE void | n_Normalize (number &n, const coeffs r)
| inplace-normalization of n; produces some canonical representation of n;
static FORCE_INLINE void | n_WriteLong (number n, const coeffs r)
| write to the output buffer of the currently used reporter
static FORCE_INLINE void | n_WriteShort (number n, const coeffs r)
| write to the output buffer of the currently used reporter in a shortest possible way, e.g. in K(a): a2 instead of a^2
static FORCE_INLINE void | n_Write (number n, const coeffs r, const BOOLEAN bShortOut=TRUE)
static FORCE_INLINE const char * | n_Read (const char *s, number *a, const coeffs r)
| !!! Recommendation: This method is too cryptic to be part of the user- !!! interface. As defined here, it is merely a helper !!! method for parsing number input strings.
static FORCE_INLINE number | n_GetDenom (number &n, const coeffs r)
| return the denominator of n (if elements of r are by nature not fractional, result is 1)
static FORCE_INLINE number | n_GetNumerator (number &n, const coeffs r)
| return the numerator of n (if elements of r are by nature not fractional, result is n)
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 exception in Z: raises an error if 'a' is not divisible by 'b' always: n_Div(a,b,r)*b+n_IntMod(a,b,r)==a
static FORCE_INLINE number | n_ExactDiv (number a, number b, const coeffs r)
| assume that there is a canonical subring in cf and we know that division is possible for these a and b in the subring, n_ExactDiv performs it, may skip additional tests. Can always be substituted by n_Div at the cost of larger computing time.
static FORCE_INLINE number | n_IntMod (number a, number b, const coeffs r)
| for r a field, return n_Init(0,r) always: n_Div(a,b,r)*b+n_IntMod(a,b,r)==a n_IntMod(a,b,r) >=0
static FORCE_INLINE void | n_Power (number a, int b, number *res, const coeffs r)
| fill res with the power a^b
static FORCE_INLINE number | n_Mult (number a, number b, const coeffs r)
| return the product of 'a' and 'b', i.e., a*b
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
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
static FORCE_INLINE number | n_Add (number a, number b, const coeffs r)
| return the sum of 'a' and 'b', i.e., a+b
static FORCE_INLINE number | n_Sub (number a, number b, const coeffs r)
| return the difference of 'a' and 'b', i.e., a-b
static FORCE_INLINE number | n_Gcd (number a, number b, const coeffs r)
| in Z: return the gcd of 'a' and 'b' in Z/nZ, Z/2^kZ: computed as in the case Z in Z/pZ, C, R: not implemented in Q: return the gcd of the numerators of 'a' and 'b' in K(a)/<p(a)>: not implemented in K(t_1, ..., t_n): not implemented
static FORCE_INLINE number | n_SubringGcd (number a, number b, const coeffs r)
static FORCE_INLINE number | n_ExtGcd (number a, number b, number *s, number *t, const coeffs r)
| beware that ExtGCD is only relevant for a few chosen coeff. domains and may perform something unexpected in some cases...
static FORCE_INLINE number | n_XExtGcd (number a, number b, number *s, number *t, number *u, number *v, const coeffs r)
static FORCE_INLINE number | n_EucNorm (number a, const coeffs r)
static FORCE_INLINE number | n_Ann (number a, const coeffs r)
| if r is a ring with zero divisors, return an annihilator!=0 of b otherwise return NULL
static FORCE_INLINE number | n_QuotRem (number a, number b, number *q, const coeffs r)
static FORCE_INLINE number | n_Lcm (number a, number b, const coeffs r)
| in Z: return the lcm of 'a' and 'b' in Z/nZ, Z/2^kZ: computed as in the case Z in Z/pZ, C, R: not implemented in K(a)/<p(a)>: not implemented in K(t_1, ..., t_n): not implemented
static FORCE_INLINE number | n_NormalizeHelper (number a, number b, const coeffs r)
| assume that r is a quotient field (otherwise, return 1) for arguments (a1/a2,b1/b2) return (lcm(a1,b2)/1)
number | ndCopyMap (number a, const coeffs src, const coeffs dst)
static FORCE_INLINE nMapFunc | n_SetMap (const coeffs src, const coeffs dst)
| set the mapping function pointers for translating numbers from src to dst
static FORCE_INLINE BOOLEAN | n_DBTest (number n, const char *filename, const int linenumber, const coeffs r)
| test whether n is a correct number; only used if LDEBUG is defined
static FORCE_INLINE void | n_CoeffWrite (const coeffs r, BOOLEAN details=TRUE)
| output the coeff description
static FORCE_INLINE BOOLEAN | nCoeff_is_Ring_2toM (const coeffs r)
static FORCE_INLINE BOOLEAN | nCoeff_is_Ring_PtoM (const coeffs r)
static FORCE_INLINE BOOLEAN | nCoeff_is_Ring (const coeffs r)
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)
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: TRUE iff 'b' divides 'a' (with remainder = zero) in Z/nZ: TRUE iff (a = 0 and b divides n in Z) or (a != 0 and b/gcd(a, b) is co-prime with n, i.e. a unit in Z/nZ) in Z/2^kZ: TRUE iff ((a = 0 mod 2^k) and (b = 0 or b is a power of 2)) or ((a, b <> 0) and (b/gcd(a, b) is odd))
static FORCE_INLINE number | n_ChineseRemainderSym (number *a, number *b, int rl, BOOLEAN sym, CFArray &inv_cache, const coeffs r)
static FORCE_INLINE number | n_Farey (number a, number b, const coeffs r)
static FORCE_INLINE int | n_ParDeg (number n, const coeffs r)
static FORCE_INLINE int | n_NumberOfParameters (const coeffs r)
| Returns the number of parameters.
static FORCE_INLINE char const ** | n_ParameterNames (const coeffs r)
| Returns a (const!) pointer to (const char*) names of parameters.
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..n_NumberOfParameters(...)
static FORCE_INLINE number | n_RePart (number i, const coeffs cf)
static FORCE_INLINE number | n_ImPart (number i, const coeffs cf)
static FORCE_INLINE BOOLEAN | nCoeff_has_Units (const coeffs r)
| returns TRUE, if r is not a field and r has non-trivial units
static FORCE_INLINE BOOLEAN | nCoeff_is_Zp (const coeffs r)
static FORCE_INLINE BOOLEAN | nCoeff_is_Zp (const coeffs r, int p)
static FORCE_INLINE BOOLEAN | nCoeff_is_Q (const coeffs r)
static FORCE_INLINE BOOLEAN | nCoeff_is_Z (const coeffs r)
static FORCE_INLINE BOOLEAN | nCoeff_is_Zn (const coeffs r)
static FORCE_INLINE BOOLEAN | nCoeff_is_Q_or_BI (const coeffs r)
static FORCE_INLINE BOOLEAN | nCoeff_is_numeric (const coeffs r)
static FORCE_INLINE BOOLEAN | nCoeff_is_R (const coeffs r)
static FORCE_INLINE BOOLEAN | nCoeff_is_GF (const coeffs r)
static FORCE_INLINE BOOLEAN | nCoeff_is_GF (const coeffs r, int q)
static FORCE_INLINE BOOLEAN | nCoeff_is_Extension (const coeffs r)
static FORCE_INLINE BOOLEAN | nCoeff_is_Zp_a (const coeffs r)
static FORCE_INLINE BOOLEAN | nCoeff_is_Zp_a (const coeffs r, int p)
static FORCE_INLINE BOOLEAN | nCoeff_is_Q_a (const coeffs r)
static FORCE_INLINE BOOLEAN | nCoeff_is_long_R (const coeffs r)
static FORCE_INLINE BOOLEAN | nCoeff_is_long_C (const coeffs r)
static FORCE_INLINE BOOLEAN | nCoeff_is_CF (const coeffs r)
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.
static FORCE_INLINE BOOLEAN | nCoeff_has_simple_Alloc (const coeffs r)
| TRUE if n_Delete is empty operation.
static FORCE_INLINE BOOLEAN | nCoeff_is_algExt (const coeffs r)
| TRUE iff r represents an algebraic extension field.
static FORCE_INLINE BOOLEAN | nCoeff_is_Q_algExt (const coeffs r)
| is it an alg. ext. of Q?
static FORCE_INLINE BOOLEAN | nCoeff_is_transExt (const coeffs r)
| TRUE iff r represents a transcendental extension field.
static FORCE_INLINE BOOLEAN | nCoeff_is_Q_transExt (const coeffs r)
| is it an trans. ext. of Q?
static FORCE_INLINE void | n_ClearContent (ICoeffsEnumerator &numberCollectionEnumerator, number &c, const coeffs r)
| Computes the content and (inplace) divides it out on a collection of numbers number c is the content (i.e. the GCD of all the coeffs, which we divide out inplace) NOTE: it assumes all coefficient numbers to be integer!!! NOTE/TODO: see also the description by Hans TODO: rename into n_ClearIntegerContent.
static FORCE_INLINE void | n_ClearDenominators (ICoeffsEnumerator &numberCollectionEnumerator, number &d, const coeffs r)
| (inplace) Clears denominators on a collection of numbers number d is the LCM of all the coefficient denominators (i.e. the number with which all the number coeffs. were multiplied) NOTE/TODO: see also the description by Hans
static FORCE_INLINE void | n_ClearContent (ICoeffsEnumerator &numberCollectionEnumerator, const coeffs r)
static FORCE_INLINE void | n_ClearDenominators (ICoeffsEnumerator &numberCollectionEnumerator, const coeffs r)
void | n_Print (number &a, const coeffs r)
| print a number (BEWARE of string buffers!) mostly for debugging
static FORCE_INLINE char * | nCoeffString (const coeffs cf)
| TODO: make it a virtual method of coeffs, together with: Decompose & Compose, rParameter & rPar.
static FORCE_INLINE char * | nCoeffName (const coeffs cf)
static FORCE_INLINE number | n_Random (siRandProc p, number p1, number p2, const coeffs cf)
static FORCE_INLINE void | n_WriteFd (number a, const ssiInfo *f, const coeffs r)
| io via ssi:
static FORCE_INLINE void | n_WriteFd_S (number a, const coeffs r)
static FORCE_INLINE number | n_ReadFd (const ssiInfo *f, const coeffs r)
| io via ssi:
static FORCE_INLINE number | n_ReadFd_S (char **s, const coeffs r)
static FORCE_INLINE number | n_convFactoryNSingN (const CanonicalForm n, const coeffs r)
static FORCE_INLINE CanonicalForm | n_convSingNFactoryN (number n, BOOLEAN setChar, const coeffs r)
static FORCE_INLINE void | number2mpz (number n, coeffs c, mpz_t m)
static FORCE_INLINE number | mpz2number (mpz_t m, coeffs c)

## Variables

const unsigned short | fftable []
EXTERN_VAR omBin | rnumber_bin

## Detailed Description

Coefficient rings, fields and other domains suitable for Singular polynomials.

The main interface for Singular coefficients: coeffs is the main handler for Singular numbers

Definition in file coeffs.h.

## Data Structure Documentation

## GFInfo

struct GFInfo

Creation data needed for finite fields.

Definition at line 99 of file coeffs.h.

Data Fields
int | GFChar |
int | GFDegree |
const char * | GFPar_name |

## LongComplexInfo

struct LongComplexInfo

Definition at line 106 of file coeffs.h.

Data Fields
short | float_len | additional char-flags, rInit
short | float_len2 | additional char-flags, rInit
const char * | par_name | parameter name

## n_Procs_s

struct n_Procs_s

Definition at line 129 of file coeffs.h.

Data Fields
numberfunc | cfAdd |
number(*)(number a, const coeffs r) | cfAnn |
number(*)(number *x, number *q, int rl, BOOLEAN sym, CFArray &inv_cache, const coeffs) | cfChineseRemainder | chinese remainder returns X with X mod q[i]=x[i], i=0..rl-1
nCoeffsEnumeratorFunc | cfClearContent | function pointer behind n_ClearContent
nCoeffsEnumeratorFunc | cfClearDenominators | function pointer behind n_ClearDenominators
char *(*)(const coeffs r) | cfCoeffName | default name of cf, should substitute cfCoeffWrite, cfCoeffString
char *(*)(const coeffs r) | cfCoeffString | string output of coeff description
void(*)(const coeffs r, BOOLEAN details) | cfCoeffWrite | output of coeff description via Print
number(*)(number a, const coeffs r) | cfCopy | return a copy of a
BOOLEAN(*)(number a, const char *f, const int l, const coeffs r) | cfDBTest | Test: is "a" a correct number?
void(*)(number *a, const coeffs r) | cfDelete |
numberfunc | cfDiv |
BOOLEAN(*)(number a, number b, const coeffs r) | cfDivBy | test if b divides a cfDivBy(zero,b,r) is true, if b is a zero divisor
int(*)(number a, number b, const coeffs r) | cfDivComp |
BOOLEAN(*)(number a, number b, const coeffs r) | cfEqual | tests
number(*)(number a, const coeffs r) | cfEucNorm |
numberfunc | cfExactDiv |
number(*)(number a, number b, number *s, number *t, const coeffs r) | cfExtGcd |
number(*)(number p, number n, const coeffs) | cfFarey | rational reconstruction: "best" rational a/b with a/b = p mod n
number(*)(number a, number b, const coeffs r) | cfGcd |
number(*)(number &n, const coeffs r) | cfGetDenom |
number(*)(number &n, const coeffs r) | cfGetNumerator |
number(*)(number a, const coeffs r) | cfGetUnit |
BOOLEAN(*)(number a, number b, const coeffs r) | cfGreater |
BOOLEAN(*)(number a, const coeffs r) | cfGreaterZero |
number(*)(number a, const coeffs r) | cfImPart |
number(*)(long i, const coeffs r) | cfInit | init with an integer
number(*)(mpz_t i, const coeffs r) | cfInitMPZ | init with a GMP integer
void(*)(number &a, number b, const coeffs r) | cfInpAdd | Inplace: a += b.
void(*)(number &a, number b, const coeffs r) | cfInpMult | Inplace: a *= b.
number(*)(number a, const coeffs r) | cfInpNeg | changes argument inline: a:= -a return -a! (no copy is returned) the result should be assigned to the original argument: e.g. a = n_InpNeg(a,r)
long(*)(number &n, const coeffs r) | cfInt | conversion to long, 0 if impossible
numberfunc | cfIntMod |
number(*)(number a, const coeffs r) | cfInvers | return 1/a
BOOLEAN(*)(number a, const coeffs r) | cfIsMOne |
BOOLEAN(*)(number a, const coeffs r) | cfIsOne |
BOOLEAN(*)(number a, const coeffs r) | cfIsUnit |
BOOLEAN(*)(number a, const coeffs r) | cfIsZero |
void(*)(coeffs r) | cfKillChar |
number(*)(number a, number b, const coeffs r) | cfLcm |
void(*)(mpz_t result, number &n, const coeffs r) | cfMPZ | Converts a (integer) number n into a GMP number, 0 if impossible.
numberfunc | cfMult |
void(*)(number &a, const coeffs r) | cfNormalize |
number(*)(number a, number b, const coeffs r) | cfNormalizeHelper |
number(*)(const int i, const coeffs r) | cfParameter | create i^th parameter or NULL if not possible
int(*)(number x, const coeffs r) | cfParDeg | degree for coefficients: -1 for 0, 0 for "constants", ...
void(*)(number a, int i, number *result, const coeffs r) | cfPower |
coeffs(*)(number c, const coeffs r) | cfQuot1 |
number(*)(number a, number b, number *rem, const coeffs r) | cfQuotRem |
number(*)(siRandProc p, number p1, number p2, const coeffs cf) | cfRandom | a function returning random elements
const char *(*)(const char *s, number *a, const coeffs r) | cfRead |
number(*)(const ssiInfo *f, const coeffs r) | cfReadFd |
number(*)(char **s, const coeffs r) | cfReadFd_S |
number(*)(number a, const coeffs r) | cfRePart |
void(*)(const coeffs r) | cfSetChar |
nMapFunc(*)(const coeffs src, const coeffs dst) | cfSetMap |
int(*)(number n, const coeffs r) | cfSize | how complicated, (0) => 0, or positive
numberfunc | cfSub |
number(*)(number a, number b, const coeffs r) | cfSubringGcd |
void(*)(number a, const ssiInfo *f, const coeffs r) | cfWriteFd |
void(*)(number a, const coeffs r) | cfWriteFd_S |
void(*)(number a, const coeffs r) | cfWriteLong | print a given number (long format)
void(*)(number a, const coeffs r) | cfWriteShort | print a given number in a shorter way, if possible e.g. in K(a): a2 instead of a^2
number(*)(number a, number b, number *s, number *t, number *u, number *v, const coeffs r) | cfXExtGcd |
int | ch |
number(*)(const CanonicalForm n, const coeffs r) | convFactoryNSingN | conversion to CanonicalForm(factory) to number
CanonicalForm(*)(number n, BOOLEAN setChar, const coeffs r) | convSingNFactoryN |
void * | data |
ring | extRing |
int | factoryVarOffset | how many variables of factory are already used by this coeff
short | float_len |
short | float_len2 |
BOOLEAN | has_simple_Alloc | TRUE, if nDelete/nCopy are dummies.
BOOLEAN | has_simple_Inverse | TRUE, if std should make polynomials monic (if nInvers is cheap) if false, then a gcd routine is used for a content computation.
int | iNumberOfParameters | Number of Parameters in the coeffs (default 0).
BOOLEAN | is_domain | TRUE, if cf is a domain.
BOOLEAN | is_field | TRUE, if cf is a field.
int | m_nfCharP | the characteristic: p
int | m_nfCharQ | the number of elements: q
int | m_nfCharQ1 | q-1
int | m_nfM1 | representation of -1
int * | m_nfMinPoly |
unsigned short * | m_nfPlus1Table |
unsigned long | mod2mMask |
mpz_ptr | modBase |
unsigned long | modExponent |
mpz_ptr | modNumber |
BOOLEAN(*)(const coeffs r, n_coeffType n, void *parameter) | nCoeffIsEqual |
coeffs | next |
unsigned short * | npExpTable |
unsigned short * | npInvTable |
unsigned short * | npLogTable |
int | npPminus1M | characteristic - 1
char const ** | pParameterNames | array containing the names of Parameters (default NULL)
int | ref |
n_coeffRep | rep |
n_coeffType | type |

## Macro Definition Documentation

## ALLOC0_RNUMBER

#define ALLOC0_RNUMBER | ( |  | ) |

Value:
(number)omAlloc0Bin(rnumber_bin)
rnumber_bin
EXTERN_VAR omBin rnumber_bin
Definition coeffs.h:91
omAlloc0Bin
#define omAlloc0Bin(bin)
Definition omAllocDecl.h:206

Definition at line 95 of file coeffs.h.

## ALLOC_RNUMBER

#define ALLOC_RNUMBER | ( |  | ) |

Value:
(number)omAllocBin(rnumber_bin)
omAllocBin
#define omAllocBin(bin)
Definition omAllocDecl.h:205

Definition at line 94 of file coeffs.h.

## FREE_RNUMBER

#define FREE_RNUMBER | ( |  | x | ) |

Value:
omFreeBin((void *)x, rnumber_bin)
x
Variable x
Definition cfModGcd.cc:4090
omFreeBin
#define omFreeBin(addr, bin)
Definition omAllocDecl.h:259

Definition at line 93 of file coeffs.h.

## n_Test

#define n_Test | ( |  | a,
|  |  | r )

Value:
n_DBTest(a, __FILE__, __LINE__, r)
n_DBTest
static FORCE_INLINE BOOLEAN n_DBTest(number n, const char *filename, const int linenumber, const coeffs r)
test whether n is a correct number; only used if LDEBUG is defined
Definition coeffs.h:712

BOOLEAN n_Test(number a, const coeffs r).

Definition at line 715 of file coeffs.h.

## Typedef Documentation

## ICoeffsEnumerator

typedef IEnumerator<number> ICoeffsEnumerator

Abstract interface for an enumerator of number coefficients for an object, e.g. a polynomial.

Definition at line 85 of file coeffs.h.

## nCoeffsEnumeratorFunc

typedef void(* nCoeffsEnumeratorFunc) (ICoeffsEnumerator &numberCollectionEnumerator, number &output, const coeffs r)

goes over coeffs given by the ICoeffsEnumerator and changes them. Additionally returns a number;

Definition at line 89 of file coeffs.h.

## nMapFunc

typedef number(* nMapFunc) (number a, const coeffs src, const coeffs dst)

maps "a", which lives in src, into dst

Definition at line 80 of file coeffs.h.

## numberfunc

typedef number(* numberfunc) (number a, number b, const coeffs r)

Definition at line 77 of file coeffs.h.

## Enumeration Type Documentation

## n_coeffRep

enum n_coeffRep

Enumerator
n_rep_unknown |
n_rep_int | (int), see modulop.h
n_rep_gap_rat | (number), see longrat.h
n_rep_gap_gmp | (), see rinteger.h, new impl.
n_rep_poly | (poly), see algext.h
n_rep_rat_fct | (fraction), see transext.h
n_rep_gmp | (mpz_ptr), see rmodulon,h
n_rep_float | (float), see shortfl.h
n_rep_gmp_float | (gmp_float), see
n_rep_gmp_complex | (gmp_complex), see gnumpc.h
n_rep_gf | (int), see ffields.h

Definition at line 114 of file coeffs.h.

{
n_rep_unknown=0,
n_rep_int, /**< (int), see modulop.h */
n_rep_gap_rat, /**< (number), see longrat.h */
n_rep_gap_gmp, /**< (), see rinteger.h, new impl. */
n_rep_poly, /**< (poly), see algext.h */
n_rep_rat_fct, /**< (fraction), see transext.h */
n_rep_gmp, /**< (mpz_ptr), see rmodulon,h */
n_rep_float, /**< (float), see shortfl.h */
n_rep_gmp_float, /**< (gmp_float), see */
n_rep_gmp_complex,/**< (gmp_complex), see gnumpc.h */
n_rep_gf /**< (int), see ffields.h */
};
n_rep_gap_rat
@ n_rep_gap_rat
(number), see longrat.h
Definition coeffs.h:118
n_rep_gap_gmp
@ n_rep_gap_gmp
(), see rinteger.h, new impl.
Definition coeffs.h:119
n_rep_float
@ n_rep_float
(float), see shortfl.h
Definition coeffs.h:123
n_rep_int
@ n_rep_int
(int), see modulop.h
Definition coeffs.h:117
n_rep_gmp_float
@ n_rep_gmp_float
(gmp_float), see
Definition coeffs.h:124
n_rep_gmp
@ n_rep_gmp
(mpz_ptr), see rmodulon,h
Definition coeffs.h:122
n_rep_poly
@ n_rep_poly
(poly), see algext.h
Definition coeffs.h:120
n_rep_gmp_complex
@ n_rep_gmp_complex
(gmp_complex), see gnumpc.h
Definition coeffs.h:125
n_rep_gf
@ n_rep_gf
(int), see ffields.h
Definition coeffs.h:126
n_rep_rat_fct
@ n_rep_rat_fct
(fraction), see transext.h
Definition coeffs.h:121
n_rep_unknown
@ n_rep_unknown
Definition coeffs.h:116

## n_coeffType

enum n_coeffType

Enumerator
n_unknown |
n_Zp | \F{p < 2^31}
n_Q | rational (GMP) numbers
n_R | single prescision (6,6) real numbers
n_GF | \GF{p^n < 2^16}
n_long_R | real floating point (GMP) numbers
n_polyExt | used to represent polys as coefficients
n_algExt | used for all algebraic extensions, i.e., the top-most extension in an extension tower is algebraic
n_transExt | used for all transcendental extensions, i.e., the top-most extension in an extension tower is transcendental
n_long_C | complex floating point (GMP) numbers
n_nTupel | n-tupel of cf: ZZ/p1,... ZZ/pn, R, long_R
n_Z | only used if HAVE_RINGS is defined
n_Zn | only used if HAVE_RINGS is defined
n_Znm | only used if HAVE_RINGS is defined
n_Z2m | only used if HAVE_RINGS is defined
n_FlintQrat | rational function field over Q
n_CF | ?
n_Nemo_AnticNumberField |
n_Nemo_QQField |
n_Nemo_ZZRing |
n_Nemo_FqPolyRepField |
n_Nemo_fqPolyRepField |
n_Nemo_Field |
n_Nemo_Ring |

Definition at line 26 of file coeffs.h.

{
n_unknown=0,
n_Zp=1, /**< \F{p < 2^31} */
n_Q=2, /**< rational (GMP) numbers */
n_R=3, /**< single prescision (6,6) real numbers */
n_GF=4, /**< \GF{p^n < 2^16} */
n_long_R=5, /**< real floating point (GMP) numbers */
n_polyExt=6, /**< used to represent polys as coefficients */
n_algExt=7, /**< used for all algebraic extensions, i.e.,
the top-most extension in an extension tower
is algebraic */
n_transExt=8, /**< used for all transcendental extensions, i.e.,
the top-most extension in an extension tower
is transcendental */
n_long_C=9, /**< complex floating point (GMP) numbers */
n_nTupel=10, /**< n-tupel of cf: ZZ/p1,... ZZ/pn, R, long_R */
n_Z=11, /**< only used if HAVE_RINGS is defined */
n_Zn=12, /**< only used if HAVE_RINGS is defined */
n_Znm=13, /**< only used if HAVE_RINGS is defined */
n_Z2m=14, /**< only used if HAVE_RINGS is defined */
n_FlintQrat=15, /**< rational function field over Q */
n_CF=16, /**< ? */
n_Nemo_AnticNumberField=17, /*17 */
n_Nemo_QQField=18, /*18 */
n_Nemo_ZZRing=19, /*19*/
n_Nemo_FqPolyRepField=20, /*20 */
n_Nemo_fqPolyRepField=21, /*21 */
n_Nemo_Field=22, /*22 */
n_Nemo_Ring=23 /*23 */
};
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_Nemo_Field
@ n_Nemo_Field
Definition coeffs.h:54
n_FlintQrat
@ n_FlintQrat
rational function field over Q
Definition coeffs.h:47
n_Nemo_AnticNumberField
@ n_Nemo_AnticNumberField
Definition coeffs.h:49
n_polyExt
@ n_polyExt
used to represent polys as coefficients
Definition coeffs.h:34
n_Q
@ n_Q
rational (GMP) numbers
Definition coeffs.h:30
n_Nemo_QQField
@ n_Nemo_QQField
Definition coeffs.h:50
n_Znm
@ n_Znm
only used if HAVE_RINGS is defined
Definition coeffs.h:45
n_Nemo_ZZRing
@ n_Nemo_ZZRing
Definition coeffs.h:51
n_algExt
@ n_algExt
used for all algebraic extensions, i.e., the top-most extension in an extension tower is algebraic
Definition coeffs.h:35
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_Nemo_Ring
@ n_Nemo_Ring
Definition coeffs.h:55
n_Zp
@ n_Zp
\F{p < 2^31}
Definition coeffs.h:29
n_CF
@ n_CF
?
Definition coeffs.h:48
n_transExt
@ n_transExt
used for all transcendental extensions, i.e., the top-most extension in an extension tower is transce...
Definition coeffs.h:38
n_unknown
@ n_unknown
Definition coeffs.h:28
n_Z
@ n_Z
only used if HAVE_RINGS is defined
Definition coeffs.h:43
n_nTupel
@ n_nTupel
n-tupel of cf: ZZ/p1,... ZZ/pn, R, long_R
Definition coeffs.h:42
n_Nemo_fqPolyRepField
@ n_Nemo_fqPolyRepField
Definition coeffs.h:53
n_long_C
@ n_long_C
complex floating point (GMP) numbers
Definition coeffs.h:41
n_Nemo_FqPolyRepField
@ n_Nemo_FqPolyRepField
Definition coeffs.h:52

## Function Documentation

## getCoeffType()

FORCE_INLINE n_coeffType getCoeffType | ( | const coeffs | r | ) |

static

Returns the type of coeffs domain.

Definition at line 431 of file coeffs.h.

{ assume(r != NULL); return r->type; }
assume
#define assume(x)
Definition mod2.h:389
NULL
#define NULL
Definition omList.c:12

## mpz2number()

FORCE_INLINE number mpz2number | ( | mpz_t | m,
|  | coeffs | c )

static

Definition at line 991 of file coeffs.h.

{ return n_InitMPZ(m, c); }
m
int m
Definition cfEzgcd.cc:128
n_InitMPZ
static FORCE_INLINE number n_InitMPZ(mpz_t n, const coeffs r)
conversion of a GMP integer to number
Definition coeffs.h:545

## n_Add()

FORCE_INLINE number n_Add | ( | number | a,
|  | number | b,
|  | const coeffs | r )

static

return the sum of 'a' and 'b', i.e., a+b

Definition at line 653 of file coeffs.h.

{ assume(r != NULL); assume(r->cfAdd!=NULL); return r->cfAdd(a, b, r); }
b
CanonicalForm b
Definition cfModGcd.cc:4111

## n_Ann()

FORCE_INLINE number n_Ann | ( | number | a,
|  | const coeffs | r )

static

if r is a ring with zero divisors, return an annihilator!=0 of b otherwise return NULL

Definition at line 682 of file coeffs.h.

{ assume(r != NULL); return r->cfAnn (a,r); }

## n_ChineseRemainderSym()

FORCE_INLINE number n_ChineseRemainderSym | ( | number * | a,
|  | number * | b,
|  | int | rl,
|  | BOOLEAN | sym,
|  | CFArray & | inv_cache,
|  | const coeffs | r )

static

Definition at line 759 of file coeffs.h.

{ assume(r != NULL); assume(r->cfChineseRemainder != NULL); return r->cfChineseRemainder(a,b,rl,sym,inv_cache,r); }

## n_ClearContent() [1/2]

FORCE_INLINE void n_ClearContent | ( | ICoeffsEnumerator & | numberCollectionEnumerator,
|  | const coeffs | r )

static

Definition at line 943 of file coeffs.h.

{ number c; n_ClearContent(numberCollectionEnumerator, c, r); n_Delete(&c, r); }
n_Delete
static FORCE_INLINE void n_Delete(number *p, const coeffs r)
delete 'p'
Definition coeffs.h:461
n_ClearContent
static FORCE_INLINE void n_ClearContent(ICoeffsEnumerator &numberCollectionEnumerator, number &c, const coeffs r)
Computes the content and (inplace) divides it out on a collection of numbers number c is the content ...
Definition coeffs.h:927

## n_ClearContent() [2/2]

FORCE_INLINE void n_ClearContent | ( | ICoeffsEnumerator & | numberCollectionEnumerator,
|  | number & | c,
|  | const coeffs | r )

static

Computes the content and (inplace) divides it out on a collection of numbers number c is the content (i.e. the GCD of all the coeffs, which we divide out inplace) NOTE: it assumes all coefficient numbers to be integer!!! NOTE/TODO: see also the description by Hans TODO: rename into n_ClearIntegerContent.

Definition at line 927 of file coeffs.h.

{ assume(r != NULL); r->cfClearContent(numberCollectionEnumerator, c, r); }

## n_ClearDenominators() [1/2]

FORCE_INLINE void n_ClearDenominators | ( | ICoeffsEnumerator & | numberCollectionEnumerator,
|  | const coeffs | r )

static

Definition at line 946 of file coeffs.h.

{ assume(r != NULL); number d; n_ClearDenominators(numberCollectionEnumerator, d, r); n_Delete(&d, r); }
n_ClearDenominators
static FORCE_INLINE void n_ClearDenominators(ICoeffsEnumerator &numberCollectionEnumerator, number &d, const coeffs r)
(inplace) Clears denominators on a collection of numbers number d is the LCM of all the coefficient d...
Definition coeffs.h:934

## n_ClearDenominators() [2/2]

FORCE_INLINE void n_ClearDenominators | ( | ICoeffsEnumerator & | numberCollectionEnumerator,
|  | number & | d,
|  | const coeffs | r )

static

(inplace) Clears denominators on a collection of numbers number d is the LCM of all the coefficient denominators (i.e. the number with which all the number coeffs. were multiplied) NOTE/TODO: see also the description by Hans

Definition at line 934 of file coeffs.h.

{ assume(r != NULL); r->cfClearDenominators(numberCollectionEnumerator, d, r); }

## n_CoeffRingQuot1()

FORCE_INLINE coeffs n_CoeffRingQuot1 | ( | number | c,
|  | const coeffs | r )

static

Definition at line 524 of file coeffs.h.

{ assume(r != NULL); assume(r->cfQuot1 != NULL); return r->cfQuot1(c, r); }

## n_CoeffWrite()

FORCE_INLINE void n_CoeffWrite | ( | const coeffs | r,
|  | BOOLEAN | details = TRUE )

static

output the coeff description

Definition at line 722 of file coeffs.h.

{ assume(r != NULL); assume(r->cfCoeffWrite != NULL); r->cfCoeffWrite(r, details); }

## n_convFactoryNSingN()

FORCE_INLINE number n_convFactoryNSingN | ( | const CanonicalForm | n,
|  | const coeffs | r )

static

Definition at line 981 of file coeffs.h.

{ assume(r != NULL); assume(r->convFactoryNSingN != NULL); return r->convFactoryNSingN(n, r); }

## n_convSingNFactoryN()

FORCE_INLINE CanonicalForm n_convSingNFactoryN | ( | number | n,
|  | BOOLEAN | setChar,
|  | const coeffs | r )

static

Definition at line 984 of file coeffs.h.

{ assume(r != NULL); assume(r->convSingNFactoryN != NULL); return r->convSingNFactoryN(n, setChar, r); }

## n_Copy()

FORCE_INLINE number n_Copy | ( | number | n,
|  | const coeffs | r )

static

return a copy of 'n'

Definition at line 457 of file coeffs.h.

{ assume(r != NULL); assume(r->cfCopy!=NULL); return r->cfCopy(n, r); }

## n_DBTest()

FORCE_INLINE BOOLEAN n_DBTest | ( | number | n,
|  | const char * | filename,
|  | const int | linenumber,
|  | const coeffs | r )

static

test whether n is a correct number; only used if LDEBUG is defined

Definition at line 712 of file coeffs.h.

{ assume(r != NULL); assume(r->cfDBTest != NULL); return r->cfDBTest(n, filename, linenumber, r); }

## n_Delete()

FORCE_INLINE void n_Delete | ( | number * | p,
|  | const coeffs | r )

static

delete 'p'

Definition at line 461 of file coeffs.h.

{ assume(r != NULL); assume(r->cfDelete!= NULL); r->cfDelete(p, r); }
p
int p
Definition cfModGcd.cc:4086

## n_Div()

FORCE_INLINE number n_Div | ( | number | a,
|  | number | b,
|  | const coeffs | r )

static

return the quotient of 'a' and 'b', i.e., a/b; raises an error if 'b' is not invertible in r exception in Z: raises an error if 'a' is not divisible by 'b' always: n_Div(a,b,r)*b+n_IntMod(a,b,r)==a

Definition at line 618 of file coeffs.h.

{ assume(r != NULL); assume(r->cfDiv!=NULL); return r->cfDiv(a,b,r); }

## n_DivBy()

FORCE_INLINE BOOLEAN n_DivBy | ( | number | a,
|  | number | b,
|  | const coeffs | r )

static

test whether 'a' is divisible 'b'; for r encoding a field: TRUE iff 'b' does not represent zero in Z: TRUE iff 'b' divides 'a' (with remainder = zero) in Z/nZ: TRUE iff (a = 0 and b divides n in Z) or (a != 0 and b/gcd(a, b) is co-prime with n, i.e. a unit in Z/nZ) in Z/2^kZ: TRUE iff ((a = 0 mod 2^k) and (b = 0 or b is a power of 2)) or ((a, b <> 0) and (b/gcd(a, b) is odd))

Definition at line 750 of file coeffs.h.

{ assume(r != NULL);
if( nCoeff_is_Ring(r) )
{
assume(r->cfDivBy!=NULL); return r->cfDivBy(a,b,r);
}
return !n_IsZero(b, r);
}
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_is_Ring
static FORCE_INLINE BOOLEAN nCoeff_is_Ring(const coeffs r)
Definition coeffs.h:732

## n_DivComp()

FORCE_INLINE int n_DivComp | ( | number | a,
|  | number | b,
|  | const coeffs | r )

static

Definition at line 527 of file coeffs.h.

{ assume(r != NULL); assume(r->cfDivComp!=NULL); return r->cfDivComp (a,b,r); }

## n_Equal()

FORCE_INLINE BOOLEAN n_Equal | ( | number | a,
|  | number | b,
|  | const coeffs | r )

static

TRUE iff 'a' and 'b' represent the same number; they may have different representations.

Definition at line 466 of file coeffs.h.

{ assume(r != NULL); assume(r->cfEqual!=NULL); return r->cfEqual(a, b, r); }

## n_EucNorm()

FORCE_INLINE number n_EucNorm | ( | number | a,
|  | const coeffs | r )

static

Definition at line 678 of file coeffs.h.

{ assume(r != NULL); assume(r->cfEucNorm!=NULL); return r->cfEucNorm (a,r); }

## n_ExactDiv()

FORCE_INLINE number n_ExactDiv | ( | number | a,
|  | number | b,
|  | const coeffs | r )

static

assume that there is a canonical subring in cf and we know that division is possible for these a and b in the subring, n_ExactDiv performs it, may skip additional tests. Can always be substituted by n_Div at the cost of larger computing time.

Definition at line 625 of file coeffs.h.

{ assume(r != NULL); assume(r->cfExactDiv!=NULL); return r->cfExactDiv(a,b,r); }

## n_ExtGcd()

FORCE_INLINE number n_ExtGcd | ( | number | a,
|  | number | b,
|  | number * | s,
|  | number * | t,
|  | const coeffs | r )

static

beware that ExtGCD is only relevant for a few chosen coeff. domains and may perform something unexpected in some cases...

Definition at line 674 of file coeffs.h.

{ assume(r != NULL); assume(r->cfExtGcd!=NULL); return r->cfExtGcd (a,b,s,t,r); }
s
const CanonicalForm int s
Definition facAbsFact.cc:51

## n_Farey()

FORCE_INLINE number n_Farey | ( | number | a,
|  | number | b,
|  | const coeffs | r )

static

Definition at line 762 of file coeffs.h.

{ assume(r != NULL); assume(r->cfFarey != NULL); return r->cfFarey(a,b,r); }

## n_Gcd()

FORCE_INLINE number n_Gcd | ( | number | a,
|  | number | b,
|  | const coeffs | r )

static

in Z: return the gcd of 'a' and 'b' in Z/nZ, Z/2^kZ: computed as in the case Z in Z/pZ, C, R: not implemented in Q: return the gcd of the numerators of 'a' and 'b' in K(a)/<p(a)>: not implemented in K(t_1, ..., t_n): not implemented

Definition at line 667 of file coeffs.h.

{ assume(r != NULL); assume(r->cfGcd!=NULL); return r->cfGcd(a,b,r); }

## n_GetChar()

FORCE_INLINE int n_GetChar | ( | const coeffs | r | ) |

static

Return the characteristic of the coeff. domain.

Definition at line 450 of file coeffs.h.

{ assume(r != NULL); return r->ch; }

## n_GetDenom()

FORCE_INLINE number n_GetDenom | ( | number & | n,
|  | const coeffs | r )

static

return the denominator of n (if elements of r are by nature not fractional, result is 1)

Definition at line 606 of file coeffs.h.

{ assume(r != NULL); assume(r->cfGetDenom!=NULL); return r->cfGetDenom(n, r); }

## n_GetNumerator()

FORCE_INLINE number n_GetNumerator | ( | number & | n,
|  | const coeffs | r )

static

return the numerator of n (if elements of r are by nature not fractional, result is n)

Definition at line 611 of file coeffs.h.

{ assume(r != NULL); assume(r->cfGetNumerator!=NULL); return r->cfGetNumerator(n, r); }

## n_GetUnit()

FORCE_INLINE number n_GetUnit | ( | number | n,
|  | const coeffs | r )

static

in Z: 1 in Z/kZ (where k is not a prime): largest divisor of n (taken in Z) that is co-prime with k in Z/2^kZ: largest odd divisor of n (taken in Z) other cases: not implemented

Definition at line 537 of file coeffs.h.

{ assume(r != NULL); assume(r->cfGetUnit!=NULL); return r->cfGetUnit(n,r); }

## n_Greater()

FORCE_INLINE BOOLEAN n_Greater | ( | number | a,
|  | number | b,
|  | const coeffs | r )

static

ordered fields: TRUE iff 'a' is larger than 'b'; in Z/pZ: TRUE iff la > lb, where la and lb are the long's representing

in C: TRUE iff (Im(a) > Im(b)) in K(a)/<p(a)>: TRUE iff (a != 0 and (b == 0 or deg(a) > deg(b)) in K(t_1, ..., t_n): TRUE only if one or both numerator polynomials are zero or if their degrees are equal. In this case, TRUE if LC(numerator(a)) > LC(numerator(b)) in Z/2^kZ: TRUE if n_DivBy(a, b) in Z/mZ: TRUE iff the internal mpz's fulfill the relation '>' in Z: TRUE iff a > b

!!! Recommendation: remove implementations for unordered fields !!! and raise errors instead, in these cases

Definition at line 517 of file coeffs.h.

{ assume(r != NULL); assume(r->cfGreater!=NULL); return r->cfGreater(a,b,r); }

## n_GreaterZero()

FORCE_INLINE BOOLEAN n_GreaterZero | ( | number | n,
|  | const coeffs | r )

static

ordered fields: TRUE iff 'n' is positive; in Z/pZ: TRUE iff 0 < m <= roundedBelow(p/2), where m is the long representing n in C: TRUE iff (Im(n) != 0 and Im(n) >= 0) or (Im(n) == 0 and Re(n) >= 0) in K(a)/<p(a)>: TRUE iff (n != 0 and (LC(n) > 0 or deg(n) > 0)) in K(t_1, ..., t_n): TRUE iff (LC(numerator(n) is a constant and > 0) or (LC(numerator(n) is not a constant) in Z/2^kZ: TRUE iff 0 < n <= 2^(k-1) in Z/mZ: TRUE iff the internal mpz is greater than zero in Z: TRUE iff n > 0

!!! Recommendation: remove implementations for unordered fields !!! and raise errors instead, in these cases !!! Do not follow this recommendation: while writing polys, !!! between 2 monomials will be an additional + iff !n_GreaterZero(next coeff) Then change definition to include n_GreaterZero => printing does NOT start with -

Definition at line 500 of file coeffs.h.

{ assume(r != NULL); assume(r->cfGreaterZero!=NULL); return r->cfGreaterZero(n,r); }

## n_ImPart()

FORCE_INLINE number n_ImPart | ( | number | i,
|  | const coeffs | cf )

static

Definition at line 788 of file coeffs.h.

{ assume(cf != NULL); assume(cf->cfImPart!=NULL); return cf->cfImPart(i,cf); }
i
int i
Definition cfEzgcd.cc:132
cf
CanonicalForm cf
Definition cfModGcd.cc:4091

## n_Init()

FORCE_INLINE number n_Init | ( | long | i,
|  | const coeffs | r )

static

a number representing i in the given coeff field/ring r

Definition at line 541 of file coeffs.h.

{ assume(r != NULL); assume(r->cfInit!=NULL); return r->cfInit(i,r); }

## n_InitMPZ()

FORCE_INLINE number n_InitMPZ | ( | mpz_t | n,
|  | const coeffs | r )

static

conversion of a GMP integer to number

Definition at line 545 of file coeffs.h.

{ assume(r != NULL); assume(r->cfInitMPZ != NULL); return r->cfInitMPZ(n,r); }

## n_InpAdd()

FORCE_INLINE void n_InpAdd | ( | number & | a,
|  | number | b,
|  | const coeffs | r )

static

addition of 'a' and 'b'; replacement of 'a' by the sum a+b

Definition at line 649 of file coeffs.h.

{ assume(r != NULL); assume(r->cfInpAdd!=NULL); r->cfInpAdd(a,b,r); }

## n_InpMult()

FORCE_INLINE void n_InpMult | ( | number & | a,
|  | number | b,
|  | const coeffs | r )

static

multiplication of 'a' and 'b'; replacement of 'a' by the product a*b

Definition at line 644 of file coeffs.h.

{ assume(r != NULL); assume(r->cfInpMult!=NULL); r->cfInpMult(a,b,r); }

## n_InpNeg()

FORCE_INLINE number n_InpNeg | ( | number | n,
|  | const coeffs | r )

static

in-place negation of n MUST BE USED: n = n_InpNeg(n) (no copy is returned)

Definition at line 560 of file coeffs.h.

{ assume(r != NULL); assume(r->cfInpNeg!=NULL); return r->cfInpNeg(n,r); }

## n_Int()

FORCE_INLINE long n_Int | ( | number & | n,
|  | const coeffs | r )

static

conversion of n to an int; 0 if not possible in Z/pZ: the representing int lying in (-p/2 .. p/2]

Definition at line 550 of file coeffs.h.

{ assume(r != NULL); assume(r->cfInt!=NULL); return r->cfInt(n,r); }

## n_IntMod()

FORCE_INLINE number n_IntMod | ( | number | a,
|  | number | b,
|  | const coeffs | r )

static

for r a field, return n_Init(0,r) always: n_Div(a,b,r)*b+n_IntMod(a,b,r)==a n_IntMod(a,b,r) >=0

Definition at line 631 of file coeffs.h.

{ assume(r != NULL); return r->cfIntMod(a,b,r); }

## n_Invers()

FORCE_INLINE number n_Invers | ( | number | a,
|  | const coeffs | r )

static

return the multiplicative inverse of 'a'; raise an error if 'a' is not invertible

!!! Recommendation: rename to 'n_Inverse'

Definition at line 567 of file coeffs.h.

{ assume(r != NULL); assume(r->cfInvers!=NULL); return r->cfInvers(a,r); }

## n_IsMOne()

FORCE_INLINE BOOLEAN n_IsMOne | ( | number | n,
|  | const coeffs | r )

static

TRUE iff 'n' represents the additive inverse of the one element, i.e. -1.

Definition at line 478 of file coeffs.h.

{ assume(r != NULL); assume(r->cfIsMOne!=NULL); return r->cfIsMOne(n,r); }

## n_IsOne()

FORCE_INLINE BOOLEAN n_IsOne | ( | number | n,
|  | const coeffs | r )

static

TRUE iff 'n' represents the one element.

Definition at line 474 of file coeffs.h.

{ assume(r != NULL); assume(r->cfIsOne!=NULL); return r->cfIsOne(n,r); }

## n_IsUnit()

FORCE_INLINE BOOLEAN n_IsUnit | ( | number | n,
|  | const coeffs | r )

static

TRUE iff n has a multiplicative inverse in the given coeff field/ring r.

Definition at line 521 of file coeffs.h.

{ assume(r != NULL); assume(r->cfIsUnit!=NULL); return r->cfIsUnit(n,r); }

## n_IsZero()

FORCE_INLINE BOOLEAN n_IsZero | ( | number | n,
|  | const coeffs | r )

static

TRUE iff 'n' represents the zero element.

Definition at line 470 of file coeffs.h.

{ assume(r != NULL); assume(r->cfIsZero!=NULL); return r->cfIsZero(n,r); }

## n_Lcm()

FORCE_INLINE number n_Lcm | ( | number | a,
|  | number | b,
|  | const coeffs | r )

static

in Z: return the lcm of 'a' and 'b' in Z/nZ, Z/2^kZ: computed as in the case Z in Z/pZ, C, R: not implemented in K(a)/<p(a)>: not implemented in K(t_1, ..., t_n): not implemented

Definition at line 693 of file coeffs.h.

{ assume(r != NULL); assume(r->cfLcm!=NULL); return r->cfLcm(a,b,r); }

## n_MPZ()

FORCE_INLINE void n_MPZ | ( | mpz_t | result,
|  | number & | n,
|  | const coeffs | r )

static

conversion of n to a GMP integer; 0 if not possible

Definition at line 554 of file coeffs.h.

{ assume(r != NULL); assume(r->cfMPZ!=NULL); r->cfMPZ(result, n, r); }
result
return result
Definition facAbsBiFact.cc:76

## n_Mult()

FORCE_INLINE number n_Mult | ( | number | a,
|  | number | b,
|  | const coeffs | r )

static

return the product of 'a' and 'b', i.e., a*b

Definition at line 639 of file coeffs.h.

{ assume(r != NULL); assume(r->cfMult!=NULL); return r->cfMult(a, b, r); }

## n_Normalize()

FORCE_INLINE void n_Normalize | ( | number & | n,
|  | const coeffs | r )

static

inplace-normalization of n; produces some canonical representation of n;

!!! Recommendation: remove this method from the user-interface, i.e., !!! this should be hidden

Definition at line 581 of file coeffs.h.

{ assume(r != NULL); assume(r->cfNormalize!=NULL); r->cfNormalize(n,r); }

## n_NormalizeHelper()

FORCE_INLINE number n_NormalizeHelper | ( | number | a,
|  | number | b,
|  | const coeffs | r )

static

assume that r is a quotient field (otherwise, return 1) for arguments (a1/a2,b1/b2) return (lcm(a1,b2)/1)

Definition at line 698 of file coeffs.h.

{ assume(r != NULL); assume(r->cfNormalizeHelper!=NULL); return r->cfNormalizeHelper(a,b,r); }

## n_NumberOfParameters()

FORCE_INLINE int n_NumberOfParameters | ( | const coeffs | r | ) |

static

Returns the number of parameters.

Definition at line 769 of file coeffs.h.

{ assume(r != NULL); return r->iNumberOfParameters; }

## n_Param()

FORCE_INLINE number n_Param | ( | const int | iParameter,
|  | const coeffs | r )

static

return the (iParameter^th) parameter as a NEW number NOTE: parameter numbering: 1..n_NumberOfParameters(...)

Definition at line 778 of file coeffs.h.

{ assume(r != NULL);
assume((iParameter >= 1) || (iParameter <= n_NumberOfParameters(r)));
assume(r->cfParameter != NULL);
return r->cfParameter(iParameter, r);
}
n_NumberOfParameters
static FORCE_INLINE int n_NumberOfParameters(const coeffs r)
Returns the number of parameters.
Definition coeffs.h:769

## n_ParameterNames()

FORCE_INLINE char const ** n_ParameterNames | ( | const coeffs | r | ) |

static

Returns a (const!) pointer to (const char*) names of parameters.

Definition at line 773 of file coeffs.h.

{ assume(r != NULL); return r->pParameterNames; }

## n_ParDeg()

FORCE_INLINE int n_ParDeg | ( | number | n,
|  | const coeffs | r )

static

Definition at line 765 of file coeffs.h.

{ assume(r != NULL); assume(r->cfParDeg != NULL); return r->cfParDeg(n,r); }

## n_Power()

FORCE_INLINE void n_Power | ( | number | a,
|  | int | b,
|  | number * | res,
|  | const coeffs | r )

static

fill res with the power a^b

Definition at line 635 of file coeffs.h.

{ assume(r != NULL); assume(r->cfPower!=NULL); r->cfPower(a,b,res,r); }
res
CanonicalForm res
Definition facAbsFact.cc:60

## n_Print()

void n_Print | ( | number & | a,
|  | const coeffs | r )

print a number (BEWARE of string buffers!) mostly for debugging

Definition at line 662 of file numbers.cc.

{
assume(r != NULL);
n_Test(a,r);
StringSetS("");
n_Write(a, r);
{ char* s = StringEndS(); Print("%s", s); omFree(s); }
n_Test
#define n_Test(a, r)
BOOLEAN n_Test(number a, const coeffs r).
Definition coeffs.h:715
n_Write
static FORCE_INLINE void n_Write(number n, const coeffs r, const BOOLEAN bShortOut=TRUE)
Definition coeffs.h:594
Print
#define Print
Definition emacs.cc:80
omFree
#define omFree(addr)
Definition omAllocDecl.h:261
StringSetS
void StringSetS(const char *st)
Definition reporter.cc:128
StringEndS
char * StringEndS()
Definition reporter.cc:151

## n_QuotRem()

FORCE_INLINE number n_QuotRem | ( | number | a,
|  | number | b,
|  | number * | q,
|  | const coeffs | r )

static

Definition at line 684 of file coeffs.h.

{ assume(r != NULL); assume(r->cfQuotRem!=NULL); return r->cfQuotRem (a,b,q,r); }

## n_Random()

FORCE_INLINE number n_Random | ( | siRandProc | p,
|  | number | p1,
|  | number | p2,
|  | const coeffs | cf )

static

Definition at line 965 of file coeffs.h.

{ assume( cf != NULL ); assume( cf->cfRandom != NULL ); return cf->cfRandom(p, p1, p2, cf); }

## n_Read()

FORCE_INLINE const char * n_Read | ( | const char * | s,
|  | number * | a,
|  | const coeffs | r )

static

!!! Recommendation: This method is too cryptic to be part of the user- !!! interface. As defined here, it is merely a helper !!! method for parsing number input strings.

Definition at line 601 of file coeffs.h.

{ assume(r != NULL); assume(r->cfRead!=NULL); return r->cfRead(s, a, r); }

## n_ReadFd()

FORCE_INLINE number n_ReadFd | ( | const ssiInfo * | f,
|  | const coeffs | r )

static

io via ssi:

Definition at line 975 of file coeffs.h.

{ assume(r != NULL); assume(r->cfReadFd != NULL); return r->cfReadFd(f, r); }
f
FILE * f
Definition checklibs.c:9

## n_ReadFd_S()

FORCE_INLINE number n_ReadFd_S | ( | char ** | s,
|  | const coeffs | r )

static

Definition at line 977 of file coeffs.h.

{ assume(r != NULL); assume(r->cfReadFd_S != NULL); return r->cfReadFd_S(s, r); }

## n_RePart()

FORCE_INLINE number n_RePart | ( | number | i,
|  | const coeffs | cf )

static

Definition at line 785 of file coeffs.h.

{ assume(cf != NULL); assume(cf->cfRePart!=NULL); return cf->cfRePart(i,cf); }

## n_SetMap()

FORCE_INLINE nMapFunc n_SetMap | ( | const coeffs | src,
|  | const coeffs | dst )

static

set the mapping function pointers for translating numbers from src to dst

Definition at line 703 of file coeffs.h.

{ assume(src != NULL && dst != NULL); assume(dst->cfSetMap!=NULL);
if (src==dst) return ndCopyMap;
return dst->cfSetMap(src,dst);
}
ndCopyMap
number ndCopyMap(number a, const coeffs src, const coeffs dst)
Definition numbers.cc:293

## n_Size()

FORCE_INLINE int n_Size | ( | number | n,
|  | const coeffs | r )

static

return a non-negative measure for the complexity of n; return 0 only when n represents zero; (used for pivot strategies in matrix computations with entries from r)

Definition at line 573 of file coeffs.h.

{ assume(r != NULL); assume(r->cfSize!=NULL); return r->cfSize(n,r); }

## n_Sub()

FORCE_INLINE number n_Sub | ( | number | a,
|  | number | b,
|  | const coeffs | r )

static

return the difference of 'a' and 'b', i.e., a-b

Definition at line 658 of file coeffs.h.

{ assume(r != NULL); assume(r->cfSub!=NULL); return r->cfSub(a, b, r); }

## n_SubringGcd()

FORCE_INLINE number n_SubringGcd | ( | number | a,
|  | number | b,
|  | const coeffs | r )

static

Definition at line 669 of file coeffs.h.

{ assume(r != NULL); assume(r->cfSubringGcd!=NULL); return r->cfSubringGcd(a,b,r); }

## n_Write()

FORCE_INLINE void n_Write | ( | number | n,
|  | const coeffs | r,
|  | const BOOLEAN | bShortOut = TRUE )

static

Definition at line 594 of file coeffs.h.

{ if (bShortOut) n_WriteShort(n, r); else n_WriteLong(n, r); }
n_WriteLong
static FORCE_INLINE void n_WriteLong(number n, const coeffs r)
write to the output buffer of the currently used reporter
Definition coeffs.h:586
n_WriteShort
static FORCE_INLINE void n_WriteShort(number n, const coeffs r)
write to the output buffer of the currently used reporter in a shortest possible way,...
Definition coeffs.h:591

## n_WriteFd()

FORCE_INLINE void n_WriteFd | ( | number | a,
|  | const ssiInfo * | f,
|  | const coeffs | r )

static

io via ssi:

Definition at line 969 of file coeffs.h.

{ assume(r != NULL); assume(r->cfWriteFd != NULL); return r->cfWriteFd(a, f, r); }

## n_WriteFd_S()

FORCE_INLINE void n_WriteFd_S | ( | number | a,
|  | const coeffs | r )

static

Definition at line 971 of file coeffs.h.

{ assume(r != NULL); assume(r->cfWriteFd_S != NULL); return r->cfWriteFd_S(a, r); }

## n_WriteLong()

FORCE_INLINE void n_WriteLong | ( | number | n,
|  | const coeffs | r )

static

write to the output buffer of the currently used reporter

Definition at line 586 of file coeffs.h.

{ assume(r != NULL); assume(r->cfWriteLong!=NULL); r->cfWriteLong(n,r); }

## n_WriteShort()

FORCE_INLINE void n_WriteShort | ( | number | n,
|  | const coeffs | r )

static

write to the output buffer of the currently used reporter in a shortest possible way, e.g. in K(a): a2 instead of a^2

Definition at line 591 of file coeffs.h.

{ assume(r != NULL); assume(r->cfWriteShort!=NULL); r->cfWriteShort(n,r); }

## n_XExtGcd()

FORCE_INLINE number n_XExtGcd | ( | number | a,
|  | number | b,
|  | number * | s,
|  | number * | t,
|  | number * | u,
|  | number * | v,
|  | const coeffs | r )

static

Definition at line 676 of file coeffs.h.

{ assume(r != NULL); assume(r->cfXExtGcd!=NULL); return r->cfXExtGcd (a,b,s,t,u,v,r); }
v
const Variable & v
< [in] a sqrfree bivariate poly
Definition facBivar.h:39

## nCoeff_has_simple_Alloc()

FORCE_INLINE BOOLEAN nCoeff_has_simple_Alloc | ( | const coeffs | r | ) |

static

TRUE if n_Delete is empty operation.

Definition at line 901 of file coeffs.h.

{ assume(r != NULL); return r->has_simple_Alloc; }

## nCoeff_has_simple_inverse()

FORCE_INLINE BOOLEAN nCoeff_has_simple_inverse | ( | const coeffs | r | ) |

static

TRUE, if the computation of the inverse is fast, i.e. prefer leading coeff. 1 over content.

Definition at line 897 of file coeffs.h.

{ assume(r != NULL); return r->has_simple_Inverse; }

## nCoeff_has_Units()

FORCE_INLINE BOOLEAN nCoeff_has_Units | ( | const coeffs | r | ) |

static

returns TRUE, if r is not a field and r has non-trivial units

Definition at line 792 of file coeffs.h.

{ assume(r != NULL); return ((getCoeffType(r)==n_Zn) || (getCoeffType(r)==n_Z2m) || (getCoeffType(r)==n_Znm)); }
getCoeffType
static FORCE_INLINE n_coeffType getCoeffType(const coeffs r)
Returns the type of coeffs domain.
Definition coeffs.h:431

## nCoeff_is_algExt()

FORCE_INLINE BOOLEAN nCoeff_is_algExt | ( | const coeffs | r | ) |

static

TRUE iff r represents an algebraic extension field.

Definition at line 905 of file coeffs.h.

{ assume(r != NULL); return (getCoeffType(r)==n_algExt); }

## nCoeff_is_CF()

FORCE_INLINE BOOLEAN nCoeff_is_CF | ( | const coeffs | r | ) |

static

Definition at line 892 of file coeffs.h.

{ assume(r != NULL); return getCoeffType(r)==n_CF; }

## nCoeff_is_Domain()

FORCE_INLINE BOOLEAN nCoeff_is_Domain | ( | const coeffs | r | ) |

static

returns TRUE, if r is a field or r has no zero divisors (i.e is a domain)

Definition at line 736 of file coeffs.h.

{
assume(r != NULL);
return (r->is_domain);
}

## nCoeff_is_Extension()

FORCE_INLINE BOOLEAN nCoeff_is_Extension | ( | const coeffs | r | ) |

static

Definition at line 841 of file coeffs.h.

{
assume(r != NULL);
return (getCoeffType(r)==n_algExt) || (getCoeffType(r)==n_transExt);
}

## nCoeff_is_GF() [1/2]

FORCE_INLINE BOOLEAN nCoeff_is_GF | ( | const coeffs | r | ) |

static

Definition at line 834 of file coeffs.h.

{ assume(r != NULL); return getCoeffType(r)==n_GF; }

## nCoeff_is_GF() [2/2]

FORCE_INLINE BOOLEAN nCoeff_is_GF | ( | const coeffs | r,
|  | int | q )

static

Definition at line 837 of file coeffs.h.

{ assume(r != NULL); return (getCoeffType(r)==n_GF) && (r->ch == q); }

## nCoeff_is_long_C()

FORCE_INLINE BOOLEAN nCoeff_is_long_C | ( | const coeffs | r | ) |

static

Definition at line 889 of file coeffs.h.

{ assume(r != NULL); return getCoeffType(r)==n_long_C; }

## nCoeff_is_long_R()

FORCE_INLINE BOOLEAN nCoeff_is_long_R | ( | const coeffs | r | ) |

static

Definition at line 886 of file coeffs.h.

{ assume(r != NULL); return getCoeffType(r)==n_long_R; }

## nCoeff_is_numeric()

FORCE_INLINE BOOLEAN nCoeff_is_numeric | ( | const coeffs | r | ) |

static

Definition at line 827 of file coeffs.h.

{ assume(r != NULL); return (getCoeffType(r)==n_R) || (getCoeffType(r)==n_long_R) || (getCoeffType(r)==n_long_C); }

## nCoeff_is_Q()

FORCE_INLINE BOOLEAN nCoeff_is_Q | ( | const coeffs | r | ) |

static

Definition at line 801 of file coeffs.h.

{
assume(r != NULL);
#if SI_INTEGER_VARIANT==1
return getCoeffType(r)==n_Q && (r->is_field);
#else
return getCoeffType(r)==n_Q;
#endif
}

## nCoeff_is_Q_a()

FORCE_INLINE BOOLEAN nCoeff_is_Q_a | ( | const coeffs | r | ) |

static

Definition at line 880 of file coeffs.h.

{
assume(r != NULL);
return ((n_GetChar(r) == 0) && nCoeff_is_Extension(r));
}
nCoeff_is_Extension
static FORCE_INLINE BOOLEAN nCoeff_is_Extension(const coeffs r)
Definition coeffs.h:841
n_GetChar
static FORCE_INLINE int n_GetChar(const coeffs r)
Return the characteristic of the coeff. domain.
Definition coeffs.h:450

## nCoeff_is_Q_algExt()

FORCE_INLINE BOOLEAN nCoeff_is_Q_algExt | ( | const coeffs | r | ) |

static

is it an alg. ext. of Q?

Definition at line 909 of file coeffs.h.

{ assume(r != NULL); return ((n_GetChar(r) == 0) && nCoeff_is_algExt(r)); }
nCoeff_is_algExt
static FORCE_INLINE BOOLEAN nCoeff_is_algExt(const coeffs r)
TRUE iff r represents an algebraic extension field.
Definition coeffs.h:905

## nCoeff_is_Q_or_BI()

FORCE_INLINE BOOLEAN nCoeff_is_Q_or_BI | ( | const coeffs | r | ) |

static

Definition at line 824 of file coeffs.h.

{ assume(r != NULL); return getCoeffType(r)==n_Q; }

## nCoeff_is_Q_transExt()

FORCE_INLINE BOOLEAN nCoeff_is_Q_transExt | ( | const coeffs | r | ) |

static

is it an trans. ext. of Q?

Definition at line 917 of file coeffs.h.

{ assume(r != NULL); return ((n_GetChar(r) == 0) && nCoeff_is_transExt(r)); }
nCoeff_is_transExt
static FORCE_INLINE BOOLEAN nCoeff_is_transExt(const coeffs r)
TRUE iff r represents a transcendental extension field.
Definition coeffs.h:913

## nCoeff_is_R()

FORCE_INLINE BOOLEAN nCoeff_is_R | ( | const coeffs | r | ) |

static

Definition at line 831 of file coeffs.h.

{ assume(r != NULL); return getCoeffType(r)==n_R; }

## nCoeff_is_Ring()

FORCE_INLINE BOOLEAN nCoeff_is_Ring | ( | const coeffs | r | ) |

static

Definition at line 732 of file coeffs.h.

{ assume(r != NULL); return (r->is_field==0); }

## nCoeff_is_Ring_2toM()

FORCE_INLINE BOOLEAN nCoeff_is_Ring_2toM | ( | const coeffs | r | ) |

static

Definition at line 726 of file coeffs.h.

{ assume(r != NULL); return (getCoeffType(r)==n_Z2m); }

## nCoeff_is_Ring_PtoM()

FORCE_INLINE BOOLEAN nCoeff_is_Ring_PtoM | ( | const coeffs | r | ) |

static

Definition at line 729 of file coeffs.h.

{ assume(r != NULL); return (getCoeffType(r)==n_Znm); }

## nCoeff_is_transExt()

FORCE_INLINE BOOLEAN nCoeff_is_transExt | ( | const coeffs | r | ) |

static

TRUE iff r represents a transcendental extension field.

Definition at line 913 of file coeffs.h.

{ assume(r != NULL); return (getCoeffType(r)==n_transExt); }

## nCoeff_is_Z()

FORCE_INLINE BOOLEAN nCoeff_is_Z | ( | const coeffs | r | ) |

static

Definition at line 811 of file coeffs.h.

{
assume(r != NULL);
#if SI_INTEGER_VARIANT==1
return ((getCoeffType(r)==n_Q) && (!r->is_field));
#else
return getCoeffType(r)==n_Z;
#endif
}

## nCoeff_is_Zn()

FORCE_INLINE BOOLEAN nCoeff_is_Zn | ( | const coeffs | r | ) |

static

Definition at line 821 of file coeffs.h.

{ assume(r != NULL); return getCoeffType(r)==n_Zn; }

## nCoeff_is_Zp() [1/2]

FORCE_INLINE BOOLEAN nCoeff_is_Zp | ( | const coeffs | r | ) |

static

Definition at line 795 of file coeffs.h.

{ assume(r != NULL); return getCoeffType(r)==n_Zp; }

## nCoeff_is_Zp() [2/2]

FORCE_INLINE BOOLEAN nCoeff_is_Zp | ( | const coeffs | r,
|  | int | p )

static

Definition at line 798 of file coeffs.h.

{ assume(r != NULL); return ((getCoeffType(r)==n_Zp) && (r->ch == p)); }

## nCoeff_is_Zp_a() [1/2]

FORCE_INLINE BOOLEAN nCoeff_is_Zp_a | ( | const coeffs | r | ) |

static

Definition at line 854 of file coeffs.h.

{
assume(r != NULL);
return ((!nCoeff_is_Ring(r)) && (n_GetChar(r) != 0) && nCoeff_is_Extension(r));
}

## nCoeff_is_Zp_a() [2/2]

FORCE_INLINE BOOLEAN nCoeff_is_Zp_a | ( | const coeffs | r,
|  | int | p )

static

Definition at line 867 of file coeffs.h.

{
assume(r != NULL);
assume(p != 0);
return ((!nCoeff_is_Ring(r)) && (n_GetChar(r) == p) && nCoeff_is_Extension(r));
}

## nCoeffName()

FORCE_INLINE char * nCoeffName | ( | const coeffs | cf | ) |

static

Definition at line 962 of file coeffs.h.

{ assume( cf != NULL ); return cf->cfCoeffName(cf); }

## nCoeffString()

FORCE_INLINE char * nCoeffString | ( | const coeffs | cf | ) |

static

TODO: make it a virtual method of coeffs, together with: Decompose & Compose, rParameter & rPar.

Definition at line 958 of file coeffs.h.

{ assume( cf != NULL ); return cf->cfCoeffString(cf); }

## nCopyCoeff()

FORCE_INLINE coeffs nCopyCoeff | ( | const coeffs | r | ) |

static

"copy" coeffs, i.e. increment ref

Definition at line 439 of file coeffs.h.

{ assume(r!=NULL); r->ref++; return r;}

## ndCopyMap()

number ndCopyMap | ( | number | a,
|  | const coeffs | src,
|  | const coeffs | dst )

Definition at line 293 of file numbers.cc.

{
// aRing and r need not be the same, but must be the same representation
assume(aRing->rep==r->rep);
if ( nCoeff_has_simple_Alloc(r) && nCoeff_has_simple_Alloc(aRing) )
return a;
else
return r->cfCopy(a, r);
}
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

## nInitChar()

coeffs nInitChar | ( | n_coeffType | t,
|  | void * | parameter )

one-time initialisations for new coeffs in case of an error return NULL

Definition at line 412 of file numbers.cc.

{
n_Procs_s *n=cf_root;
while((n!=NULL) && (n->nCoeffIsEqual!=NULL) && (!n->nCoeffIsEqual(n,t,parameter)))
n=n->next;
if (n==NULL)
{
n=(n_Procs_s*)omAlloc0(sizeof(n_Procs_s));
n->next=cf_root;
n->ref=1;
n->type=t;
// default entries (different from NULL) for some routines:
n->nCoeffIsEqual = ndCoeffIsEqual;
n->cfSize = ndSize;
n->cfGetDenom= ndGetDenom;
n->cfGetNumerator= ndGetNumerator;
n->cfImPart=ndReturn0;
n->cfDelete= ndDelete;
n->cfAnn = ndAnn;
n->cfCoeffString = ndCoeffString;
n->cfCoeffWrite = ndCoeffWrite;
n->cfCoeffName = ndCoeffName; // should always be changed!
n->cfInpAdd=ndInpAdd;
n->cfInpMult=ndInpMult;
n->cfCopy = ndCopy;
n->cfIntMod=ndIntMod; /* dummy !! */
n->cfNormalize=ndNormalize;
n->cfGcd = ndGcd;
n->cfNormalizeHelper = ndGcd; /* tricky, isn't it ?*/
n->cfLcm = ndGcd; /* tricky, isn't it ?*/
n->cfInitMPZ = ndInitMPZ;
n->cfMPZ = ndMPZ;
n->cfPower = ndPower;
n->cfQuotRem = ndQuotRem;
n->cfInvers = ndInvers;
n->cfRandom = ndRandom;
n->cfKillChar = ndKillChar; /* dummy */
n->cfSetChar = ndSetChar; /* dummy */
// temp. removed to catch all the coeffs which miss to implement this!
n->cfChineseRemainder = ndChineseRemainder; /* not implemented */
n->cfFarey = ndFarey; /* not implemented */
n->cfParDeg = ndParDeg; /* not implemented */
n->cfReadFd = ndReadFd; /* not implemented */
n->cfReadFd_S = ndReadFd_S; /* not implemented */
n->cfWriteFd = ndWriteFd; /* not implemented */
n->cfParameter = ndParameter;
n->cfClearContent = ndClearContent;
n->cfClearDenominators = ndClearDenominators;
n->cfEucNorm = ndEucNorm;
n->cfDivComp = ndDivComp;
n->cfDivBy = ndDivBy;
n->cfExtGcd = ndExtGcd;
n->cfXExtGcd = ndXExtGcd;
//n->cfGetUnit = ndGetUnit_Ring;// set afterwards
// report error, if not redefined
n->cfRead=ndRead;
n->cfSetMap=ndSetMap;
#ifdef LDEBUG
n->cfDBTest=ndDBTest;
#endif
n->convSingNFactoryN=ndConvSingNFactoryN;
n->convFactoryNSingN=ndConvFactoryNSingN;
BOOLEAN nOK=TRUE;
// init
if ((t<=nLastCoeffs) && (nInitCharTable[t]!=NULL))
nOK = (nInitCharTable[t])(n,parameter);
else
Werror("Sorry: the coeff type [%d] was not registered: it is missing in nInitCharTable", (int)t);
if (nOK)
{
omFreeSize(n,sizeof(*n));
return NULL;
}
cf_root=n;
// post init settings:
if (n->cfRePart==NULL) n->cfRePart=n->cfCopy;
if (n->cfExactDiv==NULL) n->cfExactDiv=n->cfDiv;
if (n->cfSubringGcd==NULL) n->cfSubringGcd=n->cfGcd;
if (n->cfWriteShort==NULL) n->cfWriteShort = n->cfWriteLong;
if (n->cfIsUnit==NULL)
{
if (n->is_field) n->cfIsUnit=ndIsUnit_Field;
else n->cfIsUnit=ndIsUnit_Ring;
}
if (n->cfGetUnit==NULL)
{
if (n->is_field) n->cfGetUnit=n->cfCopy;
else n->cfGetUnit=ndGetUnit_Ring;
}
if ((n->cfInvers==ndInvers)&&(n->is_field))
{
n->cfInvers=ndInvers_Ring;
}
if(n->cfMult==NULL) PrintS("cfMult missing\n");
if(n->cfSub==NULL) PrintS("cfSub missing\n");
if(n->cfAdd==NULL) PrintS("cfAdd missing\n");
if(n->cfDiv==NULL) PrintS("cfDiv missing\n");
if(n->cfExactDiv==NULL) PrintS("cfExactDiv missing\n");
if(n->cfInit==NULL) PrintS("cfInit missing\n");
if(n->cfInt==NULL) PrintS("cfInt missing\n");
if(n->cfIsUnit==NULL) PrintS("cfIsUnit missing\n");
if(n->cfGetUnit==NULL) PrintS("cfGetUnit missing\n");
if(n->cfInpNeg==NULL) PrintS("cfInpNeg missing\n");
if(n->cfXExtGcd==NULL) PrintS("cfXExtGcd missing\n");
if(n->cfAnn==NULL) PrintS("cfAnn missing\n");
if(n->cfWriteLong==NULL) PrintS("cfWriteLong missing\n");
assume(n->iNumberOfParameters>= 0);
assume( (n->iNumberOfParameters == 0 && n->pParameterNames == NULL) ||
(n->iNumberOfParameters > 0 && n->pParameterNames != NULL) );
if(n->cfGreater==NULL) PrintS("cfGreater missing\n");
if(n->cfEqual==NULL) PrintS("cfEqual missing\n");
if(n->cfIsZero==NULL) PrintS("cfIsZero missing\n");
if(n->cfIsOne==NULL) PrintS("cfIsOne missing\n");
if(n->cfIsMOne==NULL) PrintS("cfIsMOne missing\n");
if(n->cfGreaterZero==NULL) PrintS("cfGreaterZero missing\n");
/* error reporter:
if(n->cfRead==ndRead) PrintS("cfRead missing\n");
if(n->cfSetMap==ndSetMap) PrintS("cfSetMap missing\n");
*/
assume(n->type==t);
#ifndef SING_NDEBUG
if(n->cfWriteLong==NULL) Warn("cfWrite is NULL for coeff %d",t);
if(n->cfWriteShort==NULL) Warn("cfWriteShort is NULL for coeff %d",t);
#endif
}
else
{
n->ref++;
}
return n;
BOOLEAN
int BOOLEAN
Definition auxiliary.h:88
TRUE
#define TRUE
Definition auxiliary.h:101
n_Procs_s::cfReadFd_S
number(* cfReadFd_S)(char **s, const coeffs r)
Definition coeffs.h:419
n_Procs_s::convSingNFactoryN
CanonicalForm(* convSingNFactoryN)(number n, BOOLEAN setChar, const coeffs r)
Definition coeffs.h:323
n_Procs_s::cfInitMPZ
number(* cfInitMPZ)(mpz_t i, const coeffs r)
init with a GMP integer
Definition coeffs.h:188
n_Procs_s::cfImPart
number(* cfImPart)(number a, const coeffs r)
Definition coeffs.h:208
n_Procs_s::cfCoeffString
char *(* cfCoeffString)(const coeffs r)
string output of coeff description
Definition coeffs.h:158
n_Procs_s::cfLcm
number(* cfLcm)(number a, number b, const coeffs r)
Definition coeffs.h:277
n_Procs_s::iNumberOfParameters
int iNumberOfParameters
Number of Parameters in the coeffs (default 0).
Definition coeffs.h:326
n_Procs_s::cfSubringGcd
number(* cfSubringGcd)(number a, number b, const coeffs r)
Definition coeffs.h:254
n_Procs_s::cfIsMOne
BOOLEAN(* cfIsMOne)(number a, const coeffs r)
Definition coeffs.h:239
n_Procs_s::cfWriteFd
void(* cfWriteFd)(number a, const ssiInfo *f, const coeffs r)
Definition coeffs.h:284
n_Procs_s::cfIsZero
BOOLEAN(* cfIsZero)(number a, const coeffs r)
Definition coeffs.h:235
n_Procs_s::cfInvers
number(* cfInvers)(number a, const coeffs r)
return 1/a
Definition coeffs.h:204
n_Procs_s::cfMPZ
void(* cfMPZ)(mpz_t result, number &n, const coeffs r)
Converts a (integer) number n into a GMP number, 0 if impossible.
Definition coeffs.h:197
n_Procs_s::cfAnn
number(* cfAnn)(number a, const coeffs r)
Definition coeffs.h:268
n_Procs_s::cfSub
numberfunc cfSub
Definition coeffs.h:182
n_Procs_s::cfDiv
numberfunc cfDiv
Definition coeffs.h:182
n_Procs_s::cfQuotRem
number(* cfQuotRem)(number a, number b, number *rem, const coeffs r)
Definition coeffs.h:276
n_Procs_s::cfParameter
number(* cfParameter)(const int i, const coeffs r)
create i^th parameter or NULL if not possible
Definition coeffs.h:310
n_Procs_s::cfIsUnit
BOOLEAN(* cfIsUnit)(number a, const coeffs r)
Definition coeffs.h:385
n_Procs_s::cfNormalizeHelper
number(* cfNormalizeHelper)(number a, number b, const coeffs r)
Definition coeffs.h:278
n_Procs_s::cfRandom
number(* cfRandom)(siRandProc p, number p1, number p2, const coeffs cf)
a function returning random elements
Definition coeffs.h:313
n_Procs_s::cfDivBy
BOOLEAN(* cfDivBy)(number a, number b, const coeffs r)
test if b divides a cfDivBy(zero,b,r) is true, if b is a zero divisor
Definition coeffs.h:389
n_Procs_s::cfCoeffWrite
void(* cfCoeffWrite)(const coeffs r, BOOLEAN details)
output of coeff description via Print
Definition coeffs.h:155
n_Procs_s::cfInpNeg
number(* cfInpNeg)(number a, const coeffs r)
changes argument inline: a:= -a return -a! (no copy is returned) the result should be assigned to the...
Definition coeffs.h:202
n_Procs_s::cfGcd
number(* cfGcd)(number a, number b, const coeffs r)
Definition coeffs.h:253
n_Procs_s::type
n_coeffType type
Definition coeffs.h:135
n_Procs_s::cfSetChar
void(* cfSetChar)(const coeffs r)
Definition coeffs.h:168
n_Procs_s::cfAdd
numberfunc cfAdd
Definition coeffs.h:182
n_Procs_s::cfClearContent
nCoeffsEnumeratorFunc cfClearContent
function pointer behind n_ClearContent
Definition coeffs.h:316
n_Procs_s::cfDivComp
int(* cfDivComp)(number a, number b, const coeffs r)
Definition coeffs.h:384
n_Procs_s::cfReadFd
number(* cfReadFd)(const ssiInfo *f, const coeffs r)
Definition coeffs.h:285
n_Procs_s::cfRead
const char *(* cfRead)(const char *s, number *a, const coeffs r)
Definition coeffs.h:228
n_Procs_s::convFactoryNSingN
number(* convFactoryNSingN)(const CanonicalForm n, const coeffs r)
conversion to CanonicalForm(factory) to number
Definition coeffs.h:322
n_Procs_s::cfEqual
BOOLEAN(* cfEqual)(number a, number b, const coeffs r)
tests
Definition coeffs.h:234
n_Procs_s::cfWriteLong
void(* cfWriteLong)(number a, const coeffs r)
print a given number (long format)
Definition coeffs.h:211
n_Procs_s::cfDelete
void(* cfDelete)(number *a, const coeffs r)
Definition coeffs.h:279
n_Procs_s::nCoeffIsEqual
BOOLEAN(* nCoeffIsEqual)(const coeffs r, n_coeffType n, void *parameter)
Definition coeffs.h:152
n_Procs_s::cfClearDenominators
nCoeffsEnumeratorFunc cfClearDenominators
function pointer behind n_ClearDenominators
Definition coeffs.h:319
n_Procs_s::cfExactDiv
numberfunc cfExactDiv
Definition coeffs.h:182
n_Procs_s::pParameterNames
char const ** pParameterNames
array containing the names of Parameters (default NULL)
Definition coeffs.h:329
n_Procs_s::cfEucNorm
number(* cfEucNorm)(number a, const coeffs r)
Definition coeffs.h:265
n_Procs_s::cfGreaterZero
BOOLEAN(* cfGreaterZero)(number a, const coeffs r)
Definition coeffs.h:244
n_Procs_s::cfInpAdd
void(* cfInpAdd)(number &a, number b, const coeffs r)
Inplace: a += b.
Definition coeffs.h:291
n_Procs_s::cfExtGcd
number(* cfExtGcd)(number a, number b, number *s, number *t, const coeffs r)
Definition coeffs.h:255
n_Procs_s::cfFarey
number(* cfFarey)(number p, number n, const coeffs)
rational reconstruction: "best" rational a/b with a/b = p mod n
Definition coeffs.h:298
n_Procs_s::cfWriteShort
void(* cfWriteShort)(number a, const coeffs r)
print a given number in a shorter way, if possible e.g. in K(a): a2 instead of a^2
Definition coeffs.h:215
n_Procs_s::cfSetMap
nMapFunc(* cfSetMap)(const coeffs src, const coeffs dst)
Definition coeffs.h:282
n_Procs_s::cfParDeg
int(* cfParDeg)(number x, const coeffs r)
degree for coefficients: -1 for 0, 0 for "constants", ...
Definition coeffs.h:307
n_Procs_s::cfInit
number(* cfInit)(long i, const coeffs r)
init with an integer
Definition coeffs.h:185
n_Procs_s::cfInpMult
void(* cfInpMult)(number &a, number b, const coeffs r)
Inplace: a *= b.
Definition coeffs.h:288
n_Procs_s::cfKillChar
void(* cfKillChar)(coeffs r)
Definition coeffs.h:166
n_Procs_s::is_field
BOOLEAN is_field
TRUE, if cf is a field.
Definition coeffs.h:147
n_Procs_s::next
coeffs next
Definition coeffs.h:132
n_Procs_s::cfInt
long(* cfInt)(number &n, const coeffs r)
conversion to long, 0 if impossible
Definition coeffs.h:194
n_Procs_s::cfPower
void(* cfPower)(number a, int i, number *result, const coeffs r)
Definition coeffs.h:246
n_Procs_s::cfChineseRemainder
number(* cfChineseRemainder)(number *x, number *q, int rl, BOOLEAN sym, CFArray &inv_cache, const coeffs)
chinese remainder returns X with X mod q[i]=x[i], i=0..rl-1
Definition coeffs.h:304
n_Procs_s::cfGreater
BOOLEAN(* cfGreater)(number a, number b, const coeffs r)
Definition coeffs.h:232
n_Procs_s::cfDBTest
BOOLEAN(* cfDBTest)(number a, const char *f, const int l, const coeffs r)
Test: is "a" a correct number?
Definition coeffs.h:425
n_Procs_s::cfRePart
number(* cfRePart)(number a, const coeffs r)
Definition coeffs.h:207
n_Procs_s::ref
int ref
Definition coeffs.h:133
n_Procs_s::cfMult
numberfunc cfMult
Definition coeffs.h:182
n_Procs_s::cfGetUnit
number(* cfGetUnit)(number a, const coeffs r)
Definition coeffs.h:386
n_Procs_s::cfCopy
number(* cfCopy)(number a, const coeffs r)
return a copy of a
Definition coeffs.h:206
n_Procs_s::cfNormalize
void(* cfNormalize)(number &a, const coeffs r)
Definition coeffs.h:230
n_Procs_s::cfCoeffName
char *(* cfCoeffName)(const coeffs r)
default name of cf, should substitute cfCoeffWrite, cfCoeffString
Definition coeffs.h:161
n_Procs_s::cfIntMod
numberfunc cfIntMod
Definition coeffs.h:182
n_Procs_s::cfGetDenom
number(* cfGetDenom)(number &n, const coeffs r)
Definition coeffs.h:247
n_Procs_s::cfIsOne
BOOLEAN(* cfIsOne)(number a, const coeffs r)
Definition coeffs.h:236
n_Procs_s::cfXExtGcd
number(* cfXExtGcd)(number a, number b, number *s, number *t, number *u, number *v, const coeffs r)
Definition coeffs.h:263
n_Procs_s::cfGetNumerator
number(* cfGetNumerator)(number &n, const coeffs r)
Definition coeffs.h:248
n_Procs_s::cfSize
int(* cfSize)(number n, const coeffs r)
how complicated, (0) => 0, or positive
Definition coeffs.h:191
n_Procs_s
Definition coeffs.h:130
Warn
#define Warn
Definition emacs.cc:77
ndPower
static void ndPower(number a, int i, number *res, const coeffs r)
Definition numbers.cc:74
ndIsUnit_Field
static BOOLEAN ndIsUnit_Field(number a, const coeffs r)
Definition numbers.cc:122
ndConvSingNFactoryN
CanonicalForm ndConvSingNFactoryN(number, BOOLEAN, const coeffs)
Definition numbers.cc:313
ndReadFd
number ndReadFd(const ssiInfo *, const coeffs r)
Definition numbers.cc:150
ndDivComp
static int ndDivComp(number, number, const coeffs)
Definition numbers.cc:310
ndEucNorm
static number ndEucNorm(number a, const coeffs cf)
Definition numbers.cc:128
ndGetUnit_Ring
static number ndGetUnit_Ring(number, const coeffs r)
Definition numbers.cc:124
ndCoeffIsEqual
static BOOLEAN ndCoeffIsEqual(const coeffs r, n_coeffType n, void *d)
Definition numbers.cc:350
ndDBTest
static BOOLEAN ndDBTest(number, const char *, const int, const coeffs)
Definition numbers.cc:132
ndGcd
number ndGcd(number, number, const coeffs r)
Definition numbers.cc:193
ndKillChar
static void ndKillChar(coeffs)
Definition numbers.cc:303
ndClearDenominators
static void ndClearDenominators(ICoeffsEnumerator &, number &d, const coeffs r)
Definition numbers.cc:284
ndClearContent
static void ndClearContent(ICoeffsEnumerator &numberCollectionEnumerator, number &c, const coeffs r)
Definition numbers.cc:212
ndParDeg
static int ndParDeg(number n, const coeffs r)
Definition numbers.cc:167
cf_root
VAR n_Procs_s * cf_root
Definition numbers.cc:43
ndIsUnit_Ring
static BOOLEAN ndIsUnit_Ring(number a, const coeffs r)
Definition numbers.cc:120
ndNormalize
void ndNormalize(number &, const coeffs)
Definition numbers.cc:191
ndSize
static int ndSize(number a, const coeffs r)
Definition numbers.cc:210
ndFarey
static number ndFarey(number, number, const coeffs r)
Definition numbers.cc:135
ndRandom
static number ndRandom(siRandProc p, number, number, const coeffs cf)
Definition numbers.cc:126
ndMPZ
static void ndMPZ(mpz_t result, number &n, const coeffs r)
Converts a non-negative bigint number into a GMP number.
Definition numbers.cc:328
nLastCoeffs
STATIC_VAR n_coeffType nLastCoeffs
Definition numbers.cc:374
ndGetDenom
static number ndGetDenom(number &, const coeffs r)
Definition numbers.cc:208
ndDelete
static void ndDelete(number *d, const coeffs)
Definition numbers.cc:45
nInitCharTable
STATIC_VAR cfInitCharProc * nInitCharTable
Definition numbers.cc:408
ndInvers_Ring
static number ndInvers_Ring(number a, const coeffs r)
Definition numbers.cc:111
ndParameter
static number ndParameter(const int, const coeffs r)
Definition numbers.cc:172
ndReadFd_S
number ndReadFd_S(char **, const coeffs r)
Definition numbers.cc:156
ndCopy
static number ndCopy(number a, const coeffs)
Definition numbers.cc:306
ndInpMult
static void ndInpMult(number &a, number b, const coeffs r)
Definition numbers.cc:61
ndWriteFd
static void ndWriteFd(number, const ssiInfo *, const coeffs r)
Definition numbers.cc:162
ndChineseRemainder
static number ndChineseRemainder(number *, number *, int, BOOLEAN, CFArray &, const coeffs r)
Definition numbers.cc:145
ndCoeffString
static char * ndCoeffString(const coeffs r)
Definition numbers.cc:47
ndGetNumerator
static number ndGetNumerator(number &a, const coeffs r)
Definition numbers.cc:209
ndDivBy
static BOOLEAN ndDivBy(number, number, const coeffs)
Definition numbers.cc:309
ndInitMPZ
static number ndInitMPZ(mpz_t m, const coeffs r)
Definition numbers.cc:333
ndInpAdd
static void ndInpAdd(number &a, number b, const coeffs r)
Definition numbers.cc:67
ndSetMap
static nMapFunc ndSetMap(const coeffs src, const coeffs dst)
Definition numbers.cc:343
ndAnn
static number ndAnn(number, const coeffs cf)
Definition numbers.cc:46
ndInvers
static number ndInvers(number a, const coeffs r)
Definition numbers.cc:104
ndIntMod
static number ndIntMod(number a, number b, const coeffs R)
Definition numbers.cc:194
ndCoeffWrite
static void ndCoeffWrite(const coeffs r, BOOLEAN)
Definition numbers.cc:51
ndConvFactoryNSingN
static number ndConvFactoryNSingN(const CanonicalForm, const coeffs r)
[in, out] a bigint number >= 0
Definition numbers.cc:320
ndReturn0
static number ndReturn0(number, const coeffs r)
Definition numbers.cc:192
ndExtGcd
static number ndExtGcd(number, number, number *, number *, const coeffs r)
Definition numbers.cc:311
ndRead
static const char * ndRead(const char *s, number *n, const coeffs r)
Definition numbers.cc:338
ndCoeffName
static char * ndCoeffName(const coeffs r)
Definition numbers.cc:55
ndSetChar
static void ndSetChar(const coeffs)
Definition numbers.cc:304
ndXExtGcd
static number ndXExtGcd(number, number, number *, number *, number *, number *, const coeffs r)
Definition numbers.cc:140
ndQuotRem
number ndQuotRem(number a, number b, number *r, const coeffs R)
Definition numbers.cc:356
omFreeSize
#define omFreeSize(addr, size)
Definition omAllocDecl.h:260
omAlloc0
#define omAlloc0(size)
Definition omAllocDecl.h:211
PrintS
void PrintS(const char *s)
Definition reporter.cc:288
Werror
void Werror(const char *fmt,...)
Definition reporter.cc:189

## nKillChar()

void nKillChar | ( | coeffs | r | ) |

undo all initialisations

Definition at line 563 of file numbers.cc.

{
if (r!=NULL)
{
r->ref--;
if (r->ref<=0)
{
n_Procs_s tmp;
n_Procs_s* n=&tmp;
tmp.next=cf_root;
while((n->next!=NULL) && (n->next!=r)) n=n->next;
if (n->next==r)
{
n->next=n->next->next;
if (cf_root==r) cf_root=n->next;
assume (r->cfKillChar!=NULL); r->cfKillChar(r);
omFreeSize((void *)r, sizeof(n_Procs_s));
r=NULL;
}
else
{
WarnS("cf_root list destroyed");
}
}
}
WarnS
#define WarnS
Definition emacs.cc:78

## nSetChar()

FORCE_INLINE void nSetChar | ( | const coeffs | r | ) |

static

initialisations after each ring change

Definition at line 446 of file coeffs.h.

{ assume(r!=NULL); assume(r->cfSetChar != NULL); r->cfSetChar(r); }

## number2mpz()

FORCE_INLINE void number2mpz | ( | number | n,
|  | coeffs | c,
|  | mpz_t | m )

static

Definition at line 990 of file coeffs.h.

{ n_MPZ(m, n, c); }
n_MPZ
static FORCE_INLINE void n_MPZ(mpz_t result, number &n, const coeffs r)
conversion of n to a GMP integer; 0 if not possible
Definition coeffs.h:554

## Variable Documentation

## fftable

const unsigned short fftable[]

extern

Definition at line 27 of file ffields.cc.

{
4, 8, 16, 32, 64, 128, 256, 512,1024,2048,4096,8192,16384, 32768,
/*2^2 2^3 2^4 2^5 2^6 2^7 2^8 2^9 2^10 2^11 2^12 2^13 2^14 2^15*/
9, 27, 81,243,729,2187, 6561,19683,59049,
/*3^2 3^3 3^4 3^5 3^6 3^7 3^8 3^9 3^10*/
25,125,625,3125,15625,
/*5^2 5^3 5^4 5^5 5^6*/
49,343,2401,16807,
/*7^2 7^3 7^4 7^5*/
121,1331, 14641,
/*11^2 11^3 11^4*/
169, 2197, 28561,
/*13^2 13^3 13^4*/
289, 4913,
/*17^2 17^3*/
361, 6859,
/*19^2 19^3*/
529, 12167,
/*23^2 23^3*/
841, 24389,
/*29^2 29^3*/
961, 29791,
/*31^2 31^3*/
1369, 50653,
/*37^2 37^3*/
1681, /*41^2*/
1849, /*43^2*/
2209, /*47^2*/
2809, /*53^2*/
3481, /*59^2*/
3721, /*61^2*/
4489, /*67^2*/
5041, /*71^2*/
5329, /*73^2*/
6241, /*79^2*/
6889, /*83^2*/
7921, /*89^2*/
9409, /*97^2*/
10201, /*101^2*/
10609, /*103^2*/
11449, /*107^2*/
11881, /*109^2*/
12769, /*113^2*/
16129, /*127^2*/
17161, /*131^2*/
18769, /*137^2*/
19321, /*139^2*/
22201, /*149^2*/
22801, /*151^2*/
24649, /*157^2*/
26569, /*163^2*/
27889, /*167^2*/
29929, /*173^2*/
32041, /*179^2*/
32761, /*181^2*/
36481, /*191^2*/
37249, /*193^2*/
38809, /*197^2*/
39601, /*199^2*/
49729, /*223^2*/
44521, /*211^2*/
51529, /*227^2*/
52441, /*229^2*/
54289, /*233^2*/
57121, /*239^2*/
58081, /*241^2*/
63001, /*251^2*/
0 };

## rnumber_bin

EXTERN_VAR omBin rnumber_bin

Definition at line 91 of file coeffs.h.