]> www.ginac.de Git - ginac.git/commitdiff
log_eval: don't apply the log(x^p) -> p*log(x) rule.
authorAlexei Sheplyakov <Alexei.Sheplyakov@gmail.com>
Sat, 18 Jan 2014 12:13:46 +0000 (14:13 +0200)
committerAlexei Sheplyakov <Alexei.Sheplyakov@gmail.com>
Tue, 28 Jan 2014 09:33:01 +0000 (11:33 +0200)
Automatically transforming log(p^2) into 2 log(p) might be quite annoying.
Perhaps this transformation should be moved to expand() and applied only
if expand_options::expand_transcendental is specified.

check/exam_inifcns.cpp
ginac/inifcns_trans.cpp

index 32368e6030a9d92d747ffccf2c2e84c0a1634ecd..3a1a36b5bd8d3c615a8ee3211efd782626e0a84a 100644 (file)
@@ -310,9 +310,6 @@ static unsigned inifcns_consist_log()
        if (!e1.is_equal(e2))
                ++result;
 
-       if (!ex(log(pow(p,a))).is_equal(a*log(p)))
-               ++result;
-
        // shall not do for non-real powers
        if (ex(log(pow(p,z))).is_equal(z*log(p)))
                ++result;
index 56d909c6a2a40c7b48276cb98644a8da148a9b74..c5551f75a2e77e4c247914d4cd531df458b7b1c9 100644 (file)
@@ -175,11 +175,6 @@ static ex log_eval(const ex & x)
                        return t;
        }
 
-       // log(p^a) -> a*log(p), if p>0 and a is real
-       if (is_exactly_a<power>(x) && x.op(0).info(info_flags::positive) && x.op(1).info(info_flags::real)) {
-               return x.op(1)*log(x.op(0));
-       }
-
        return log(x).hold();
 }