35 #define TRANSEXT_PRIVATES
40 #include <factory/factory.h>
64 #define ADD_COMPLEXITY 1
65 #define MULT_COMPLEXITY 2
66 #define DIFF_COMPLEXITY 2
67 #define BOUND_COMPLEXITY 10
70 #define NUMIS1(f) (p_IsOne(NUM(f), cf->extRing))
72 #define COM(f) f->complexity
76 #define ntTest(a) ntDBTest(a,__FILE__,__LINE__,cf)
79 #define ntTest(a) do {} while (0)
87 #define ntRing cf->extRing
93 #define ntCoeffs cf->extRing->cf
131 BOOLEAN simpleTestsHaveAlreadyBeenPerformed);
182 if (IS0(a))
return TRUE;
184 const fraction t = (fraction)a;
200 Print(
"?/1 in %s:%d\n",f,l);
206 Print(
"negative sign of DEN. of a fraction in %s:%d\n",f,l);
235 if (!(
SR_HDL(n) & SR_INT))
238 Print(
"rational coeff in num: %s:%d\n",f,l);
249 Print(
"rational coeff in den.:%s:%d\n",f,l);
270 cf = cf->extRing->cf;
287 fraction
f = (fraction)(*a);
303 if (a == b)
return TRUE;
304 if ((IS0(a)) && (!IS0(b)))
return FALSE;
305 if ((IS0(b)) && (!IS0(a)))
return FALSE;
308 fraction fa = (fraction)a;
309 fraction fb = (fraction)b;
310 if ((
COM(fa) == 1) && (
COM(fb) == 1))
316 if (DENIS1(fa) && DENIS1(fb))
return TRUE;
317 if (DENIS1(fa) && !DENIS1(fb))
return FALSE;
318 if (!DENIS1(fa) && DENIS1(fb))
return FALSE;
345 if (IS0(a))
return NULL;
346 fraction
f = (fraction)a;
362 if (IS0(a))
return NULL;
366 fraction
f = (fraction)a;
369 const BOOLEAN denis1= DENIS1 (f);
436 fraction
f = (fraction)a;
440 const BOOLEAN denis1 = DENIS1 (f);
458 if( DEN (f) !=
NULL )
526 fraction
f = (fraction)a;
535 fraction
f = (fraction)a;
536 if ((f==
NULL) || (!DENIS1(f)))
return FALSE;
549 fraction
f = (fraction)a;
634 if (IS0(a))
return 0;
636 fraction
f = (fraction)a;
637 if (!DENIS1(f))
return 0;
639 const poly aAsPoly = NUM(f);
664 number aNumCoeff =
NULL;
int aNumDeg = 0;
665 number aDenCoeff =
NULL;
int aDenDeg = 0;
666 number bNumCoeff =
NULL;
int bNumDeg = 0;
667 number bDenCoeff =
NULL;
int bDenDeg = 0;
670 fraction fa = (fraction)a;
682 fraction fb = (fraction)b;
692 if (aNumDeg-aDenDeg > bNumDeg-bDenDeg)
return TRUE;
693 if (aNumDeg-aDenDeg < bNumDeg-bDenDeg)
return FALSE;
715 if (IS0(a))
return FALSE;
716 fraction
f = (fraction)a;
725 const ring
A = cf->extRing;
734 const int P =
rVar(A);
737 Print(
"// %d parameter : ", P);
739 for (
int nop=0; nop <
P; nop ++)
744 PrintS(
"\n// minpoly : 0\n");
771 fraction t = (fraction) d;
774 WerrorS(
"expected differentiation by a variable");
780 WerrorS(
"expected differentiation by a variable");
784 if (IS0(a))
return ntCopy(a, cf);
786 fraction fa = (fraction)a;
792 if (NUM(result)==
NULL)
805 if (NUM(result)==
NULL)
return(
NULL);
821 if (IS0(a))
return ntCopy(b, cf);
822 if (IS0(b))
return ntCopy(a, cf);
824 fraction fa = (fraction)a;
825 fraction fb = (fraction)b;
836 if (DENIS1(fa) && DENIS1(fb)) f =
NULL;
837 else if (!DENIS1(fa) && DENIS1(fb)) f =
p_Copy(DEN(fa),
ntRing);
838 else if (DENIS1(fa) && !DENIS1(fb)) f =
p_Copy(DEN(fb),
ntRing);
862 if (IS0(b))
return ntCopy(a, cf);
864 fraction fa = (fraction)a;
865 fraction fb = (fraction)b;
876 if (DENIS1(fa) && DENIS1(fb)) f =
NULL;
877 else if (!DENIS1(fa) && DENIS1(fb)) f =
p_Copy(DEN(fa),
ntRing);
878 else if (DENIS1(fa) && !DENIS1(fb)) f =
p_Copy(DEN(fb),
ntRing);
900 if (IS0(a) || IS0(b))
return NULL;
902 fraction fa = (fraction)a;
903 fraction fb = (fraction)b;
913 const poly da = DEN(fa);
914 const poly db = DEN(fb);
969 if (IS0(a))
return NULL;
972 fraction fa = (fraction)a;
973 fraction fb = (fraction)b;
1017 if (exp >= 0) *b =
NULL;
1020 else if (exp == 0) { *b =
ntInit(1, cf);
return;}
1021 else if (exp == 1) { *b =
ntCopy(a, cf);
return;}
1022 else if (exp == -1) { *b =
ntInvers(a, cf);
return;}
1024 int expAbs =
exp;
if (expAbs < 0) expAbs = -expAbs;
1027 number
pow; number t;
1031 for (
int i = 2;
i <= expAbs;
i++)
1047 t =
ntMult(pow, factor, cf);
1052 expAbs = expAbs / 2;
1055 t =
ntMult(factor, factor, cf);
1108 number c; number tmp;
1117 lcmOfDenominators = tmp;
1126 lcmOfDenominators = tmp;
1147 gcdOfCoefficients = tmp;
1156 gcdOfCoefficients = tmp;
1161 number inverseOfGcdOfCoefficients =
n_Invers(gcdOfCoefficients,
1175 if ((DEN(f) !=
NULL) &&
1182 if( DEN(f) !=
NULL )
1198 fraction
f = (fraction)a;
1200 if (DENIS1(f) ||
NUMIS1(f)) {
COM(f) = 0;
return; }
1218 if( DEN(f) !=
NULL )
1247 BOOLEAN simpleTestsHaveAlreadyBeenPerformed)
1251 fraction
f = (fraction)a;
1254 if (!simpleTestsHaveAlreadyBeenPerformed)
1256 if (DENIS1(f) ||
NUMIS1(f)) {
COM(f) = 0;
return; }
1376 if( DEN(f) !=
NULL )
1401 fraction
f = (fraction)a;
1428 fraction
f = (fraction)a;
1497 fraction fb = (fraction)b;
1499 fraction fa = (fraction)a;
1514 number contentpa, contentpb, tmp;
1587 fraction fa = (fraction)a;
1588 fraction fb = (fraction)b;
1603 number contentpa, contentpb, tmp;
1660 if (IS0(a))
return -1;
1665 fraction
f = (fraction)a;
1675 if (d > numDegree) numDegree = d;
1688 if (d > denDegree) denDegree = d;
1693 return numDegree + denDegree + noOfTerms;
1705 fraction
f = (fraction)a;
1731 DEN(result) = num_f;
1758 assume(src->rep == dst->extRing->cf->rep);
1768 fraction ff=(fraction)res;
1770 else DEN(ff)=
p_NSet(nn,dst->extRing);
1781 poly p=
p_NSet(nMap(a, src,dst->extRing->cf), dst->extRing);
1796 number q =
n_Init(n, dst->extRing->cf);
1809 if (IS0(a))
return NULL;
1811 const ring rSrc = cf->extRing;
1812 const ring rDst = dst->extRing;
1817 fraction
f = (fraction)a;
1823 h =
prCopyR(DEN(f), rSrc, rDst);
1831 n_Test((number)result, dst);
1838 if (IS0(a))
return NULL;
1840 const ring rSrc = cf->extRing;
1841 const ring rDst = dst->extRing;
1844 fraction
f = (fraction)a;
1850 h =
prMapR(DEN(f), nMap, rSrc, rDst);
1858 n_Test((number)result, dst);
1885 number q =
nlModP(a, src, dst->extRing->cf);
1907 assume(src == dst->extRing->cf);
1924 number q =
n_Init(n, dst->extRing->cf);
1931 p =
p_One(dst->extRing);
1965 if (src->ch == dst->ch)
return ntMapPP;
1969 if (h != 1)
return NULL;
1977 if (
rVar(src->extRing) >
rVar(dst->extRing))
1980 for (
int i = 0;
i <
rVar(src->extRing);
i++)
1986 if (src->extRing->cf==dst->extRing->cf)
1993 if (src->extRing->cf==dst->extRing->cf)
2005 if (n==
ntCopyAlg) printf(
"n=ntCopyAlg\n");
2006 else if (n==
ntCopyMap) printf(
"n=ntCopyMap\n");
2007 else if (n==
ntMapUP) printf(
"n=ntMapUP\n");
2008 else if (n==
ntMap0P) printf(
"n=ntMap0P\n");
2009 else if (n==
ntMapP0) printf(
"n=ntMapP0\n");
2010 else if (n==
ntMap00) printf(
"n=ntMap00\n");
2011 else if (n==
NULL) printf(
"n=NULL\n");
2012 else printf(
"n=?\n");
2019 if ((--cf->extRing->ref) == 0)
2039 fraction
f = (fraction)n;
2046 if (IS0(a))
return -1;
2047 fraction fa = (fraction)a;
2048 return cf->extRing->pFDeg(NUM(fa),cf->extRing);
2056 const ring
R = cf->extRing;
2058 assume( 0 < iParameter && iParameter <=
rVar(R) );
2079 const ring
R = cf->extRing;
2082 fraction
f = (fraction)m;
2084 if( DEN(f) !=
NULL )
2087 return p_Var( NUM(f), R );
2095 return NUM((fraction)n);
2107 const ring
R = cf->extRing;
2114 numberCollectionEnumerator.
Reset();
2116 if( !numberCollectionEnumerator.
MoveNext() )
2129 number &n = numberCollectionEnumerator.
Current();
2133 fraction
f = (fraction)n;
2151 while( numberCollectionEnumerator.
MoveNext() ) ;
2160 numberCollectionEnumerator.
Reset();
2161 while (numberCollectionEnumerator.
MoveNext() )
2163 number &n = numberCollectionEnumerator.
Current();
2164 const number t =
ntDiv(n, c, cf);
2181 number gg =
ntMult(g, c, cf);
2195 numberCollectionEnumerator.
Reset();
2197 if( !numberCollectionEnumerator.
MoveNext() )
2208 const ring
R = cf->extRing;
2217 number &n = numberCollectionEnumerator.
Current();
2252 while( numberCollectionEnumerator.
MoveNext() );
2262 numberCollectionEnumerator.
Reset();
2266 while (numberCollectionEnumerator.
MoveNext() )
2268 number &n = numberCollectionEnumerator.
Current();
2269 number t =
ntMult(n, c, cf);
2275 fraction
f = (fraction)t;
2297 numberCollectionEnumerator.
Reset();
2298 while (numberCollectionEnumerator.
MoveNext() )
2300 number &n = numberCollectionEnumerator.
Current();
2301 fraction
f = (fraction)n;
2339 number *X=(number *)
omAlloc(rl*
sizeof(number));
2341 for(i=0;i<rl;i++) P[i]=
p_Copy(NUM((fraction)(x[
i])),cf->extRing);
2346 P[
i]=
p_Copy(DEN((fraction)(x[i])),cf->extRing);
2358 return ((number)result);
2365 NUM(result)=
p_Farey(
p_Copy(NUM((fraction)p),cf->extRing),n,cf->extRing);
2366 DEN(result)=
p_Farey(
p_Copy(DEN((fraction)p),cf->extRing),n,cf->extRing);
2367 return ((number)result);
2398 cf->factoryVarOffset = R->cf->factoryVarOffset +
rVar(R);
2412 cf->cfInpNeg =
ntNeg;
2417 cf->cfExactDiv =
ntDiv;
2434 cf->cfSubringGcd =
ntGcd;
2450 cf->iNumberOfParameters =
rVar(R);
2451 cf->pParameterNames = (
const char**)R->names;
2453 cf->has_simple_Inverse=
FALSE;
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 l...
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_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...
long ntInt(number &a, const coeffs cf)
const CanonicalForm int s
poly p_Diff(poly a, int k, const ring r)
#define BOUND_COMPLEXITY
maximum complexity of a number
poly singclap_gcd_and_divide(poly &f, poly &g, const ring r)
clears denominators of f and g, divides by gcd(f,g)
number ntNormalizeHelper(number a, number b, const coeffs cf)
number ntDiff(number a, number d, const coeffs cf)
static FORCE_INLINE BOOLEAN nCoeff_is_Zp(const coeffs r)
number ntMap00(number a, const coeffs src, const coeffs dst)
number ntMapUP(number a, const coeffs src, const coeffs dst)
poly prCopyR(poly p, ring src_r, ring dest_r)
number ntGenMap(number a, const coeffs cf, const coeffs dst)
number ntImPart(number a, const coeffs cf)
void ntDelete(number *a, const coeffs cf)
static poly convert(const number &n)
used for all transcendental extensions, i.e., the top-most extension in an extension tower is transce...
#define DIFF_COMPLEXITY
complexity increase due to * and /
void p_String0Long(const poly p, ring lmRing, ring tailRing)
print p in a long way
number ntDiv(number a, number b, const coeffs cf)
number ntChineseRemainder(number *x, number *q, int rl, BOOLEAN sym, const coeffs cf)
static FORCE_INLINE BOOLEAN n_IsOne(number n, const coeffs r)
TRUE iff 'n' represents the one element.
poly p_NSet(number n, const ring r)
returns the poly representing the number n, destroys n
number ndCopyMap(number a, const coeffs aRing, const coeffs r)
BOOLEAN ntIsMOne(number a, const coeffs cf)
number ntMult(number a, number b, const coeffs cf)
static FORCE_INLINE number n_Init(long i, const coeffs r)
a number representing i in the given coeff field/ring r
#define omFreeSize(addr, size)
const CanonicalForm CFMap CFMap int &both_non_zero int n
number ntSub(number a, number b, const coeffs cf)
static short rVar(const ring r)
#define rVar(r) (r->N)
poly singclap_gcd(poly f, poly g, const ring r)
destroys f and g
(), see rinteger.h, new impl.
void ntWriteLong(number &a, const coeffs cf)
poly p_Div_nn(poly p, const number n, const ring r)
void ntWriteShort(number &a, const coeffs cf)
int ntSize(number a, const coeffs cf)
void handleNestedFractionsOverQ(fraction f, const coeffs cf)
static long p_Totaldegree(poly p, const ring r)
BOOLEAN ntIsZero(number a, const coeffs cf)
static FORCE_INLINE void n_Normalize(number &n, const coeffs r)
inplace-normalization of n; produces some canonical representation of n;
BOOLEAN ntDBTest(number a, const char *f, const int l, const coeffs r)
void WerrorS(const char *s)
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...
(fraction), see transext.h
nMapFunc ntSetMap(const coeffs src, const coeffs dst)
Get a mapping function from src into the domain of this type (n_transExt)
void p_Norm(poly p1, const ring r)
static FORCE_INLINE BOOLEAN nCoeff_is_Q(const coeffs r)
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy ...
char * naCoeffString(const coeffs r)
poly singclap_pdivide(poly f, poly g, const ring r)
static number p_SetCoeff(poly p, number n, ring r)
poly p_Sub(poly p1, poly p2, const ring r)
static coeffs nCoeff_bottom(const coeffs r, int &height)
static BOOLEAN rCanShortOut(const ring r)
BOOLEAN ntIsOne(number a, const coeffs cf)
static poly p_Copy(poly p, const ring r)
returns a copy of p
void ntNormalize(number &a, const coeffs cf)
poly prMapR(poly src, nMapFunc nMap, ring src_r, ring dest_r)
number ntInvers(number a, const coeffs cf)
static BOOLEAN p_LmIsConstant(const poly p, const ring r)
BOOLEAN ntGreater(number a, number b, const coeffs cf)
static int ntParDeg(number a, const coeffs cf)
static FORCE_INLINE number n_Mult(number a, number b, const coeffs r)
return the product of 'a' and 'b', i.e., a*b
virtual void Reset()=0
Sets the enumerator to its initial position: -1, which is before the first element in the collection...
const char * p_Read(const char *st, poly &rc, const ring r)
number ntCopyMap(number a, const coeffs cf, const coeffs dst)
const char * ntRead(const char *s, number *a, const coeffs cf)
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 ...
static void ntClearDenominators(ICoeffsEnumerator &numberCollectionEnumerator, number &c, const coeffs cf)
number ntMapPP(number a, const coeffs src, const coeffs dst)
Coefficient rings, fields and other domains suitable for Singular polynomials.
poly p_Farey(poly p, number N, const ring r)
CanonicalForm ntConvSingNFactoryN(number n, BOOLEAN, const coeffs cf)
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 ...
Concrete implementation of enumerators over polynomials.
static long p_GetExp(const poly p, const unsigned long iBitmask, const int VarOffset)
get a single variable exponent : the integer VarOffset encodes:
This is a polynomial enumerator for simple iteration over coefficients of polynomials.
number ntInit(long i, const coeffs cf)
static BOOLEAN p_IsConstant(const poly p, const ring r)
The main handler for Singular numbers which are suitable for Singular polynomials.
Templated enumerator interface for simple iteration over a generic collection of T's.
number ntFarey(number p, number n, const coeffs cf)
number ntGetDenom(number &a, const coeffs cf)
TODO: normalization of a!?
number ntGenAlg(number a, const coeffs cf, const coeffs dst)
static poly pp_Mult_qq(poly p, poly q, const ring r)
void StringAppendS(const char *st)
poly convFactoryPSingP(const CanonicalForm &f, const ring r)
number(* nMapFunc)(number a, const coeffs src, const coeffs dst)
maps "a", which lives in src, into dst
number ntMapP0(number a, const coeffs src, const coeffs dst)
static const n_coeffType ID
Our own type!
number nlModP(number q, const coeffs Q, const coeffs Zp)
virtual reference Current()=0
Gets the current element in the collection (read and write).
number ntNeg(number a, const coeffs cf)
this is in-place, modifies a
#define n_Test(a, r)
BOOLEAN n_Test(number a, const coeffs r)
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 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 BOOLEAN ntCoeffIsEqual(const coeffs cf, n_coeffType n, void *param)
#define NUMIS1(f)
TRUE iff num. represents 1.
struct for passing initialization parameters to naInitChar
poly p_ChineseRemainder(poly *xx, number *x, number *q, int rl, const ring R)
const char *const nDivBy0
static BOOLEAN p_IsOne(const poly p, const ring R)
either poly(1) or gen(k)?!
void PrintS(const char *s)
static char * rRingVar(short i, const ring r)
static poly p_Mult_nn(poly p, number n, const ring r)
BOOLEAN ntGreaterZero(number a, const coeffs cf)
forward declarations
number ntRePart(number a, const coeffs cf)
void definiteGcdCancellation(number a, const coeffs cf, BOOLEAN simpleTestsHaveAlreadyBeenPerformed)
modifies a
static FORCE_INLINE BOOLEAN n_IsZero(number n, const coeffs r)
TRUE iff 'n' represents the zero element.
BOOLEAN rEqual(ring r1, ring r2, BOOLEAN qr)
returns TRUE, if r1 equals r2 FALSE, otherwise Equality is determined componentwise, if qr == 1, then qrideal equality is tested, as well
static FORCE_INLINE nMapFunc n_SetMap(const coeffs src, const coeffs dst)
set the mapping function pointers for translating numbers from src to dst
go into polynomials over an alg. extension recursively
static FORCE_INLINE n_coeffType getCoeffType(const coeffs r)
Returns the type of coeffs domain.
BOOLEAN p_EqualPolys(poly p1, poly p2, const ring r)
number ntCopy(number a, const coeffs cf)
static void ntClearContent(ICoeffsEnumerator &numberCollectionEnumerator, number &c, const coeffs cf)
void p_Normalize(poly p, const ring r)
static void p_Delete(poly *p, const ring r)
#define omGetSpecBin(size)
static unsigned long p_SetExp(poly p, const unsigned long e, const unsigned long iBitmask, const int VarOffset)
set a single variable exponent : VarOffset encodes the position in p->exp
void heuristicGcdCancellation(number a, const coeffs cf)
static FORCE_INLINE void n_CoeffWrite(const coeffs r, BOOLEAN details=TRUE)
output the coeff description
CanonicalForm convSingPFactoryP(poly p, const ring r)
number ntAdd(number a, number b, const coeffs cf)
static FORCE_INLINE number n_Copy(number n, const coeffs r)
return a copy of 'n'
static number ntParameter(const int iParameter, const coeffs cf)
return the specified parameter as a number in the given trans.ext.
void rDelete(ring r)
unconditionally deletes fields in r
BOOLEAN ntEqual(number a, number b, const coeffs cf)
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...
virtual bool MoveNext()=0
Advances the enumerator to the next element of the collection. returns true if the enumerator was suc...
number ntMapZ0(number a, const coeffs src, const coeffs dst)
void ntPower(number a, int exp, number *b, const coeffs cf)
void ntKillChar(coeffs cf)
number ntConvFactoryNSingN(const CanonicalForm n, const coeffs cf)
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 void p_Setm(poly p, const ring r)
static FORCE_INLINE number n_SubringGcd(number a, number b, const coeffs r)
number ntGetNumerator(number &a, const coeffs cf)
TODO: normalization of a!?
static FORCE_INLINE BOOLEAN nCoeff_is_Extension(const coeffs r)
int ntIsParam(number m, const coeffs cf)
if m == var(i)/1 => return i,
static poly p_Neg(poly p, const ring r)
number ntMap0P(number a, const coeffs src, const coeffs dst)
static FORCE_INLINE void n_Delete(number *p, const coeffs r)
delete 'p'
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)/
: 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
#define ADD_COMPLEXITY
complexity increase due to + and -
static poly p_Add_q(poly p, poly q, const ring r)
#define omFreeBin(addr, bin)
Rational pow(const Rational &a, int e)
number ntCopyAlg(number a, const coeffs cf, const coeffs dst)
number ntGcd(number a, number b, const coeffs cf)
int p_Var(poly m, const ring r)
#define MULT_COMPLEXITY
complexity increase due to * and /
poly p_ISet(long i, const ring r)
returns the poly representing the integer i
static poly p_Mult_q(poly p, poly q, const ring r)
void ntCoeffWrite(const coeffs cf, BOOLEAN details)
void p_String0Short(const poly p, ring lmRing, ring tailRing)
print p in a short way, if possible
const CanonicalForm const CanonicalForm const CanonicalForm const CanonicalForm & cand
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...
BOOLEAN ntInitChar(coeffs cf, void *infoStruct)
Initialize the coeffs object.