X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=ginac%2Fex.cpp;h=6c51fe6e02b596686fd01d788cf8cbe89539239a;hp=412f8c95509fb3af03367b5a4a9de4d90474e44d;hb=308cc279067413f46f2ceda60431ba61089d8368;hpb=68381b57513bb09d41cef9522afae60a40c2c3d7 diff --git a/ginac/ex.cpp b/ginac/ex.cpp index 412f8c95..6c51fe6e 100644 --- a/ginac/ex.cpp +++ b/ginac/ex.cpp @@ -238,33 +238,7 @@ void ex::dbgprinttree(void) const bool ex::info(unsigned inf) const { - if (inf == info_flags::normal_form) { - - // Polynomials are in normal form - if (info(info_flags::polynomial)) - return true; - - // polynomial^(-int) is in normal form - if (is_ex_exactly_of_type(*this, power)) - return op(1).info(info_flags::negint); - - // polynomial^(int) * polynomial^(int) * ... is in normal form - if (!is_ex_exactly_of_type(*this, mul)) - return false; - for (unsigned i=0; iinfo(inf); - } + return bp->info(inf); } unsigned ex::nops() const @@ -303,60 +277,6 @@ ex ex::coeff(const symbol & s, int n) const return bp->coeff(s,n); } -ex ex::numer(bool normalize) const -{ - ex n; - if (normalize && !info(info_flags::normal_form)) - n = normal(); - else - n = *this; - - // polynomial - if (n.info(info_flags::polynomial)) - return n; - - // something^(-int) - if (is_ex_exactly_of_type(n, power) && n.op(1).info(info_flags::negint)) - return _ex1(); - - // something^(int) * something^(int) * ... - if (!is_ex_exactly_of_type(n, mul)) - return n; - ex res = _ex1(); - for (unsigned i=0; i