]> www.ginac.de Git - ginac.git/blobdiff - ginac/inifcns.cpp
mul::can_make_flat(): Finish ancient unfinished code.
[ginac.git] / ginac / inifcns.cpp
index 28d54fed3e79924dffbd95c457add5ff2bbd662a..9ac5ceba882add64f91025c733c2abd20d7d3450 100644 (file)
@@ -273,6 +273,9 @@ static ex abs_eval(const ex & arg)
        if (arg.info(info_flags::nonnegative))
                return arg;
 
+       if (arg.info(info_flags::negative) || (-arg).info(info_flags::nonnegative))
+               return -arg;
+
        if (is_ex_the_function(arg, abs))
                return arg;
 
@@ -953,7 +956,7 @@ static ex binomial_eval(const ex & x, const ex &y)
                return binomial(x, y).hold();
 }
 
-// At the moment the numeric evaluation of a binomail function always
+// At the moment the numeric evaluation of a binomial function always
 // gives a real number, but if this would be implemented using the gamma
 // function, also complex conjugation should be changed (or rather, deleted).
 static ex binomial_conjugate(const ex & x, const ex & y)