X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=ginac%2Fex.cpp;h=6a7a0aa91bdf3b823bf48beda6cbd735948523a6;hp=cdef6254cb003f4935a49ec81fb5bbe9a6c6d078;hb=955cb185a85535ab328ffedbfccdc508ce80fa91;hpb=b5e7e31e6d33bbae4d635c27637c7e114b043735 diff --git a/ginac/ex.cpp b/ginac/ex.cpp index cdef6254..6a7a0aa9 100644 --- a/ginac/ex.cpp +++ b/ginac/ex.cpp @@ -29,6 +29,7 @@ #include "numeric.h" #include "power.h" #include "debugmsg.h" +#include "utils.h" #ifndef NO_GINAC_NAMESPACE namespace GiNaC { @@ -42,11 +43,11 @@ namespace GiNaC { #ifndef INLINE_EX_CONSTRUCTORS -ex::ex() : bp(exZERO().bp) +ex::ex() : bp(ex0().bp) { debugmsg("ex default constructor",LOGLEVEL_CONSTRUCT); - GINAC_ASSERT(exZERO().bp!=0); - GINAC_ASSERT(exZERO().bp->flags & status_flags::dynallocated); + GINAC_ASSERT(ex0().bp!=0); + GINAC_ASSERT(ex0().bp->flags & status_flags::dynallocated); GINAC_ASSERT(bp!=0); ++bp->refcount; } @@ -313,12 +314,12 @@ ex ex::numer(bool normalize) const // something^(-int) if (is_ex_exactly_of_type(n, power) && n.op(1).info(info_flags::negint)) - return exONE(); + return _ex1(); // something^(int) * something^(int) * ... if (!is_ex_exactly_of_type(n, mul)) return n; - ex res = exONE(); + ex res = _ex1(); for (int i=0; i