]> www.ginac.de Git - ginac.git/blobdiff - ginac/inifcns.cpp
- normal() respects the "level" parameter to limit the recursion depth
[ginac.git] / ginac / inifcns.cpp
index f7d2864ef9ae64035eae269d140b6c36b6d41169..85a7365fa980ece03a596b9b9cff70724c8da529 100644 (file)
@@ -84,7 +84,7 @@ static ex csgn_eval(const ex & x)
     if (is_ex_exactly_of_type(x, numeric))
         return csgn(ex_to_numeric(x));
     
-    if (is_ex_exactly_of_type(x, mul)) {
+    else if (is_ex_exactly_of_type(x, mul)) {
         numeric oc = ex_to_numeric(x.op(x.nops()-1));
         if (oc.is_real()) {
             if (oc > 0)
@@ -102,8 +102,8 @@ static ex csgn_eval(const ex & x)
                 // csgn(-42*I*x) -> -csgn(I*x)
                 return -csgn(I*x/oc).hold();
         }
-    }
-    
+       }
+   
     return csgn(x).hold();
 }