X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=ginac%2Fnormal.cpp;h=28ea9e6c1ff0d18f573094f58d38e6da00fe80d1;hp=f57e4f0dbb60b31c3fc7bb053b905881ffee24f2;hb=5378fa494d21758a9c750efa2a90b49f34692e4b;hpb=14405559f3674c95cae22c5238730c375bc965e4 diff --git a/ginac/normal.cpp b/ginac/normal.cpp index f57e4f0d..28ea9e6c 100644 --- a/ginac/normal.cpp +++ b/ginac/normal.cpp @@ -47,9 +47,9 @@ #include "symbol.h" #include "utils.h" -#ifndef NO_GINAC_NAMESPACE +#ifndef NO_NAMESPACE_GINAC namespace GiNaC { -#endif // ndef NO_GINAC_NAMESPACE +#endif // ndef NO_NAMESPACE_GINAC // If comparing expressions (ex::compare()) is fast, you can set this to 1. // Some routines like quo(), rem() and gcd() will then return a quick answer @@ -224,20 +224,25 @@ static numeric lcm_of_coefficients_denominators(const ex &e) * @param e multivariate polynomial (need not be expanded) * @param lcm LCM to multiply in */ -static ex multiply_lcm(const ex &e, const ex &lcm) +static ex multiply_lcm(const ex &e, const numeric &lcm) { if (is_ex_exactly_of_type(e, mul)) { ex c = _ex1(); - for (int i=0; irest,numeric)); -#ifndef NO_GINAC_NAMESPACE +#ifndef NO_NAMESPACE_GINAC numeric coeff = GiNaC::smod(ex_to_numeric(it->coeff), xi); -#else // ndef NO_GINAC_NAMESPACE +#else // ndef NO_NAMESPACE_GINAC numeric coeff = ::smod(ex_to_numeric(it->coeff), xi); -#endif // ndef NO_GINAC_NAMESPACE +#endif // ndef NO_NAMESPACE_GINAC if (!coeff.is_zero()) newseq.push_back(expair(it->rest, coeff)); it++; } GINAC_ASSERT(is_ex_exactly_of_type(overall_coeff,numeric)); -#ifndef NO_GINAC_NAMESPACE +#ifndef NO_NAMESPACE_GINAC numeric coeff = GiNaC::smod(ex_to_numeric(overall_coeff), xi); -#else // ndef NO_GINAC_NAMESPACE +#else // ndef NO_NAMESPACE_GINAC numeric coeff = ::smod(ex_to_numeric(overall_coeff), xi); -#endif // ndef NO_GINAC_NAMESPACE +#endif // ndef NO_NAMESPACE_GINAC return (new add(newseq,coeff))->setflag(status_flags::dynallocated); } @@ -984,11 +989,11 @@ ex mul::smod(const numeric &xi) const #endif // def DO_GINAC_ASSERT mul * mulcopyp=new mul(*this); GINAC_ASSERT(is_ex_exactly_of_type(overall_coeff,numeric)); -#ifndef NO_GINAC_NAMESPACE +#ifndef NO_NAMESPACE_GINAC mulcopyp->overall_coeff = GiNaC::smod(ex_to_numeric(overall_coeff),xi); -#else // ndef NO_GINAC_NAMESPACE +#else // ndef NO_NAMESPACE_GINAC mulcopyp->overall_coeff = ::smod(ex_to_numeric(overall_coeff),xi); -#endif // ndef NO_GINAC_NAMESPACE +#endif // ndef NO_NAMESPACE_GINAC mulcopyp->clearflag(status_flags::evaluated); mulcopyp->clearflag(status_flags::hash_calculated); return mulcopyp->setflag(status_flags::dynallocated); @@ -1104,7 +1109,7 @@ factored_a: ex g = _ex1(); ex acc_ca = _ex1(); ex part_b = b; - for (int i=0; i