15 #include "factory/factory.h" 27 #define TRANSEXT_PRIVATES 69 number n=r->cf->convFactoryNSingN(f, r->cf);
98 for (
int i = 1;
i <=n;
i++ )
127 for (
int i = 1;
i <= n;
i++ )
146 convRecAP_R( f, exp, result,par_start, var_start, r );
178 for ( i =
rVar(r); i>0 ; i-- )
179 p_SetExp( term, i , exp[i+var_start],r);
183 for ( i = 1; i <= var_start; i++ )
185 p_AddExp(z,i,exp[i],r->cf->extRing);
189 for ( i = par_start+1; i <= var_start+
rPar(r); i++ )
191 p_AddExp(z,i,exp[i-par_start],r->cf->extRing);
195 result =
p_Add_q( result, term, r );
218 if (
p_GetCoeff( p, r->cf->extRing )->s == 3 )
221 mpz_init_set( dummy, (
p_GetCoeff( p,r->cf->extRing )->z) );
229 mpz_init_set( num, (
p_GetCoeff( p, r->cf->extRing )->z) );
230 mpz_init_set( den, (
p_GetCoeff( p, r->cf->extRing )->n) );
235 if ( (e =
p_GetExp( p, 1, r->cf->extRing )) != 0 )
236 term *=
power( a , e );
264 poly t=
p_Init (r->cf->extRing);
273 if( r->cf->extRing !=
NULL )
274 if (r->cf->extRing->qideal->m[0]!=
NULL)
276 poly
l=r->cf->extRing->qideal->m[0];
296 WerrorS(
"conversion error: denominator!= 1");
309 for (
int i = n;
i > 0;
i-- )
349 if ( f.
level() > offs )
354 exp[l-offs] =
i.exp();
363 for (
int i =
rVar(r);
i>0;
i-- )
368 result =
p_Add_q( result, term,r );
374 convSingGFFactoryGF( poly
p )
377 int e, n = pVariables;
385 for (
int i = 1;
i <= n;
i++ )
400 int n = pVariables+1;
404 convRecGFGF( f, exp, result );
428 for (
int i = 1;
i <= pVariables;
i++ )
433 result =
pAdd( result, term );
int gf_value(const CanonicalForm &f)
CanonicalForm convSingAPFactoryAP(poly p, const Variable &a, const ring r)
static BOOLEAN rField_is_Zp_a(const ring r)
gmp_float exp(const gmp_float &a)
number n_convFactoryNSingN(const CanonicalForm n, const coeffs r)
static int rPar(const ring r)
(r->cf->P)
factory's class for variables
void sBucketDestroyMerge(sBucket_pt bucket, poly *p, int *length)
#define omFreeSize(addr, size)
static short rVar(const ring r)
#define rVar(r) (r->N)
CanonicalForm convSingTrPFactoryP(poly p, const ring r)
poly convFactoryPSingTrP(const CanonicalForm &f, const ring r)
static FORCE_INLINE void n_Normalize(number &n, const coeffs r)
inplace-normalization of n; produces some canonical representation of n;
void WerrorS(const char *s)
CanonicalForm convSingAFactoryA(poly p, const Variable &a, const ring r)
CanonicalForm make_cf(const mpz_ptr n)
poly convFactoryASingA(const CanonicalForm &f, const ring r)
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy ...
static void p_SetExpV(poly p, int *ev, const ring r)
#define pGetExp(p, i)
Exponent.
Coefficient rings, fields and other domains suitable for Singular polynomials.
CanonicalForm make_cf_from_gf(const int z)
int convFactoryISingI(const CanonicalForm &f)
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 ...
const CanonicalForm CFMap CFMap & N
static long p_GetExp(const poly p, const unsigned long iBitmask, const int VarOffset)
get a single variable exponent : the integer VarOffset encodes:
number ntInit(long i, const coeffs cf)
static void conv_RecPP(const CanonicalForm &f, int *exp, sBucket_pt result, ring r)
poly convFactoryPSingP(const CanonicalForm &f, const ring r)
sBucket_pt sBucketCreate(const ring r)
static void convRecTrP(const CanonicalForm &f, int *exp, poly &result, int offs, const ring r)
BOOLEAN convSingTrP(poly p, const ring r)
static const int SW_RATIONAL
set to 1 for computations over Q
static FORCE_INLINE BOOLEAN n_IsZero(number n, const coeffs r)
TRUE iff 'n' represents the zero element.
poly p_PolyDiv(poly &p, const poly divisor, const BOOLEAN needResult, const ring r)
assumes that p and divisor are univariate polynomials in r, mentioning the same variable; assumes div...
void out_cf(const char *s1, const CanonicalForm &f, const char *s2)
class to iterate through CanonicalForm's
static number convFactoryNSingAN(const CanonicalForm &f, const ring r)
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
CanonicalForm convSingPFactoryP(poly p, const ring r)
#define pInit()
allocates a new monomial and initializes everything to 0
static BOOLEAN p_IsConstantPoly(const poly p, const ring r)
static void p_Setm(poly p, const ring r)
static long p_AddExp(poly p, int v, long ee, ring r)
void sBucket_Merge_m(sBucket_pt bucket, poly p)
static FORCE_INLINE void n_Delete(number *p, const coeffs r)
delete 'p'
poly convFactoryAPSingAP(const CanonicalForm &f, const ring r)
static poly p_Add_q(poly p, poly q, const ring r)
static poly p_Init(const ring r, omBin bin)
static void convRecAP_R(const CanonicalForm &f, int *exp, poly &result, int par_start, int var_start, const ring r)
poly convFactoryAPSingAP_R(const CanonicalForm &f, int par_start, int var_start, const ring r)