From c73eae02da30a989fbbb160a15e390269e69b255 Mon Sep 17 00:00:00 2001 From: Jens Vollinga Date: Sun, 4 Jan 2004 16:51:08 +0000 Subject: [PATCH] Added log(exp(x)) -> x for real symbols. --- ginac/inifcns_trans.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ginac/inifcns_trans.cpp b/ginac/inifcns_trans.cpp index 239b1ea2..75b81210 100644 --- a/ginac/inifcns_trans.cpp +++ b/ginac/inifcns_trans.cpp @@ -124,6 +124,9 @@ static ex log_eval(const ex & x) // log(exp(t)) -> t (if -Pi < t.imag() <= Pi): if (is_ex_the_function(x, exp)) { const ex &t = x.op(0); + if (is_a(t) && (ex_to(t).get_domain() == symbol_options::real)) { + return t; + } if (t.info(info_flags::numeric)) { const numeric &nt = ex_to(t); if (nt.is_real()) -- 2.44.0