731{
733 {
740 }
742 {
746 return F*lcinv;
747 }
750
754 bool fail;
768 {
770 {
773 }
774 }
775 else
776 {
778 {
784 return tmp;
785 }
786 }
787
791
793
794 int mv =
f.level();
i =
g.level();
797
798 bound =
new int[mv+1];
799 other = new int[mv+1];
800 for(
int i=1;
i<=mv;
i++)
804 for(
int i=1;
i<=mv;
i++)
807
809 q = 1;
814 {
817 continue;
818 fail = false;
822
827 {
829 continue;
830 }
832 {
835 if(fail)
836 continue;
839 delete[] other;
842 }
844
845 for(
int i=1;
i<=mv;
i++)
848
850 {
852
853
854
855 q = newq;
863 "time for rational reconstruction in alg gcd: ")
871#ifdef HAVE_NTL
872#ifdef HAVE_FLINT
873 if (
equal && tmp.isUnivariate() &&
f.isUnivariate() &&
g.isUnivariate()
874 &&
f.level() == tmp.level() && tmp.level() ==
g.level())
875 {
879 {
882 {
887 "time for successful termination test in alg gcd: ")
888 delete[] other;
891 }
892 }
893 }
895#endif
896#endif
898 {
903 "time for successful termination test in alg gcd: ")
904 delete[] other;
907 }
909 "time
for unsuccessful termination
test in alg
gcd: ")
912 continue;
913 }
915 continue;
916
921 }
922
924 delete[] other;
931}
bool isLess(int *a, int *b, int lower, int upper)
static void leadDeg(const CanonicalForm &f, int degs[])
bool isEqual(int *a, int *b, int lower, int upper)
for(int i=0;i<=n;i++) degsf[i]
void tryInvert(const CanonicalForm &F, const CanonicalForm &M, CanonicalForm &inv, bool &fail)
CanonicalForm bCommonDen(const CanonicalForm &f)
CanonicalForm bCommonDen ( const CanonicalForm & f )
bool fdivides(const CanonicalForm &f, const CanonicalForm &g)
bool fdivides ( const CanonicalForm & f, const CanonicalForm & g )
void FACTORY_PUBLIC 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,...
static const int SW_USE_QGCD
set to 1 to use Encarnacion GCD over Q(a)
static const int SW_RATIONAL
set to 1 for computations over Q
static CanonicalForm bound(const CFMatrix &M)
int cf_getBigPrime(int i)
TIMING_END_AND_PRINT(fac_alg_resultant, "time to compute resultant0: ")
TIMING_START(fac_alg_resultant)
CanonicalForm alg_content(const CanonicalForm &f, const CFList &as)
void newtonDivrem(const CanonicalForm &F, const CanonicalForm &G, CanonicalForm &Q, CanonicalForm &R)
division with remainder of univariate polynomials over Q and Q(a) using Newton inversion,...
bool isZero(const CFArray &A)
checks if entries of A are zero
static number Farey(number, number, const coeffs)
void setReduce(const Variable &alpha, bool reduce)
CanonicalForm getMipo(const Variable &alpha, const Variable &x)