X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=ginac%2Fnormal.cpp;h=cdaf8367f7cdfe68a98ff44e594f96ee03fb57bd;hp=9e24b99bc12e68bb2a5cdcbe263d4637bd9c64ea;hb=af0c47009ca7a15af966430bdf1a72fe05c1c6f9;hpb=ac3a435cba5134b800825a5e8bc26c1153c62ad1;ds=sidebyside diff --git a/ginac/normal.cpp b/ginac/normal.cpp index 9e24b99b..cdaf8367 100644 --- a/ginac/normal.cpp +++ b/ginac/normal.cpp @@ -93,7 +93,6 @@ static struct _stat_print { * @param e expression to search * @param x pointer to first symbol found (returned) * @return "false" if no symbol was found, "true" otherwise */ - static bool get_first_symbol(const ex &e, const symbol *&x) { if (is_ex_exactly_of_type(e, symbol)) { @@ -186,7 +185,6 @@ static void collect_symbols(const ex &e, sym_desc_vec &v) * @param a first multivariate polynomial * @param b second multivariate polynomial * @param v vector of sym_desc structs (filled in) */ - static void get_symbol_stats(const ex &a, const ex &b, sym_desc_vec &v) { collect_symbols(a.eval(), v); // eval() to expand assigned symbols @@ -247,7 +245,6 @@ static numeric lcmcoeff(const ex &e, const numeric &l) * * @param e multivariate polynomial (need not be expanded) * @return LCM of denominators of coefficients */ - static numeric lcm_of_coefficients_denominators(const ex &e) { return lcmcoeff(e, _num1()); @@ -258,7 +255,6 @@ 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 numeric &lcm) { if (is_ex_exactly_of_type(e, mul)) { @@ -288,7 +284,6 @@ static ex multiply_lcm(const ex &e, const numeric &lcm) * * @param e expanded polynomial * @return integer content */ - numeric ex::integer_content(void) const { GINAC_ASSERT(bp!=0); @@ -349,7 +344,6 @@ numeric mul::integer_content(void) const * @param check_args check whether a and b are polynomials with rational * coefficients (defaults to "true") * @return quotient of a and b in Q[x] */ - ex quo(const ex &a, const ex &b, const symbol &x, bool check_args) { if (b.is_zero()) @@ -400,7 +394,6 @@ ex quo(const ex &a, const ex &b, const symbol &x, bool check_args) * @param check_args check whether a and b are polynomials with rational * coefficients (defaults to "true") * @return remainder of a(x) and b(x) in Q[x] */ - ex rem(const ex &a, const ex &b, const symbol &x, bool check_args) { if (b.is_zero()) @@ -452,7 +445,6 @@ ex rem(const ex &a, const ex &b, const symbol &x, bool check_args) * @param check_args check whether a and b are polynomials with rational * coefficients (defaults to "true") * @return pseudo-remainder of a(x) and b(x) in Z[x] */ - ex prem(const ex &a, const ex &b, const symbol &x, bool check_args) { if (b.is_zero()) @@ -506,14 +498,13 @@ ex prem(const ex &a, const ex &b, const symbol &x, bool check_args) * coefficients (defaults to "true") * @return "true" when exact division succeeds (quotient returned in q), * "false" otherwise */ - bool divide(const ex &a, const ex &b, ex &q, bool check_args) { q = _ex0(); if (b.is_zero()) throw(std::overflow_error("divide: division by zero")); - if (a.is_zero()) - return true; + if (a.is_zero()) + return true; if (is_ex_exactly_of_type(b, numeric)) { q = a / b; return true; @@ -816,7 +807,6 @@ ex ex::primpart(const symbol &x) const * @param x variable in which to compute the primitive part * @param c previously computed content part * @return primitive part */ - ex ex::primpart(const symbol &x, const ex &c) const { if (is_zero()) @@ -1039,7 +1029,6 @@ static ex red_gcd(const ex &a, const ex &b, const symbol *x) * @param x pointer to symbol (main variable) in which to compute the GCD in * @return the GCD as a new expression * @see gcd */ - static ex sr_gcd(const ex &a, const ex &b, const symbol *x) { //clog << "sr_gcd(" << a << "," << b << ")\n"; @@ -1115,7 +1104,6 @@ static ex sr_gcd(const ex &a, const ex &b, const symbol *x) * @param e expanded multivariate polynomial * @return maximum coefficient * @see heur_gcd */ - numeric ex::max_coefficient(void) const { GINAC_ASSERT(bp!=0); @@ -1171,7 +1159,6 @@ numeric mul::max_coefficient(void) const * @param xi modulus * @return mapped polynomial * @see heur_gcd */ - ex ex::smod(const numeric &xi) const { GINAC_ASSERT(bp!=0); @@ -1259,7 +1246,6 @@ class gcdheu_failed {}; * @return the GCD as a new expression * @see gcd * @exception gcdheu_failed() */ - static ex heur_gcd(const ex &a, const ex &b, ex *ca, ex *cb, sym_desc_vec::const_iterator var) { //clog << "heur_gcd(" << a << "," << b << ")\n"; @@ -1347,7 +1333,6 @@ static ex heur_gcd(const ex &a, const ex &b, ex *ca, ex *cb, sym_desc_vec::const * @param check_args check whether a and b are polynomials with rational * coefficients (defaults to "true") * @return the GCD as a new expression */ - ex gcd(const ex &a, const ex &b, ex *ca, ex *cb, bool check_args) { //clog << "gcd(" << a << "," << b << ")\n"; @@ -1682,7 +1667,7 @@ static ex replace_with_symbol(const ex &e, lst &sym_lst, lst &repl_lst) for (unsigned i=0; i