From bee5f67dae5b409bc53ff71cb98f6630832540e7 Mon Sep 17 00:00:00 2001 From: Alexei Sheplyakov Date: Sat, 18 Jan 2014 14:13:46 +0200 Subject: [PATCH] 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. --- check/exam_inifcns.cpp | 3 --- ginac/inifcns_trans.cpp | 5 ----- 2 files changed, 8 deletions(-) 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(); } -- 2.49.0