86 (void)
bextgcd( q1, q2, s, dummy );
121 DEBINCLEVEL( cerr,
"chineseRemainder( ... CFArray ... )" );
127 DEBOUTLN( cerr,
"array size = " << n );
132 while ( i < start + n - 1 )
158 DEBDECLEVEL( cerr,
"chineseRemainder( ... CFArray ... )" );
183 C=A-(E-
mod(E , N))/N*B;
208 SqrRoot (bound, NTLq/2);
219 bool lessZero= (
sign (NTLc) == -1);
221 NTL::negate (NTLc, NTLc);
223 if (ReconstructRational (NTLnum, NTLden, NTLc, NTLq, bound, bound))
226 NTL::negate (NTLnum, NTLnum);
230 result +=
power (x, i.
exp())*(num/den);
238 result +=
power( x, i.
exp() ) * Farey_n(c,q);
256 (void)
bextgcd( a, b, s, dummy );
270 for (i = 0; i < len; i++) prod *= n[i];
272 for (i = 0; i < len; i++)
278 xnew =
mod(sum , prod);
void chineseRemainder(const CanonicalForm &x1, const CanonicalForm &q1, const CanonicalForm &x2, const CanonicalForm &q2, CanonicalForm &xnew, CanonicalForm &qnew)
void chineseRemainder ( const CanonicalForm & x1, const CanonicalForm & q1, const CanonicalForm & x2...
const CanonicalForm int s
ZZ convertFacCF2NTLZZ(const CanonicalForm &f)
NAME: convertFacCF2NTLZZX.
Conversion to and from NTL.
static CanonicalForm bound(const CFMatrix &M)
functions to print debug output
#define DEBINCLEVEL(stream, msg)
factory's class for variables
const CanonicalForm CFMap CFMap int &both_non_zero int n
#define DEBDECLEVEL(stream, msg)
void chineseRemainderCached(CFArray &a, CFArray &n, CanonicalForm &xnew, CanonicalForm &prod, CFArray &inv)
CF_NO_INLINE int hasTerms() const
check if iterator has reached < the end of CanonicalForm
CanonicalForm Farey(const CanonicalForm &f, const CanonicalForm &q)
Farey rational reconstruction.
CF_NO_INLINE CanonicalForm coeff() const
get the current coefficient
const CanonicalForm CFMap CFMap & N
static const int SW_RATIONAL
set to 1 for computations over Q
Iterators for CanonicalForm's.
class to iterate through CanonicalForm's
REvaluation E(1, terms.length(), IntRandom(25))
CF_NO_INLINE int exp() const
get the current exponent
static CanonicalForm chin_mul_inv(CanonicalForm a, CanonicalForm b, int ind, CFArray &inv)
bool isZero(const CFArray &A)
checks if entries of A are zero
#define ASSERT(expression, message)
#define DEBOUTLN(stream, objects)
CanonicalForm convertNTLZZX2CF(const ZZX &polynom, const Variable &x)