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.
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;
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();
}