From: Alexei Sheplyakov Date: Sat, 18 Jan 2014 12:13:46 +0000 (+0200) Subject: log_eval: don't apply the log(x^p) -> p*log(x) rule. X-Git-Tag: release_1-6-3~24 X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=commitdiff_plain;h=bee5f67dae5b409bc53ff71cb98f6630832540e7 log_eval: don't apply the log(x^p) -> p*log(x) rule. 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. --- diff --git a/check/exam_inifcns.cpp b/check/exam_inifcns.cpp index 32368e60..3a1a36b5 100644 --- a/check/exam_inifcns.cpp +++ b/check/exam_inifcns.cpp @@ -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; diff --git a/ginac/inifcns_trans.cpp b/ginac/inifcns_trans.cpp index 56d909c6..c5551f75 100644 --- a/ginac/inifcns_trans.cpp +++ b/ginac/inifcns_trans.cpp @@ -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(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(); }