From: Vladimir V. Kisil Date: Sat, 2 Nov 2013 19:06:53 +0000 (+0200) Subject: Introduce expand_options::expand_transcendental. X-Git-Tag: release_1-6-3~33 X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=commitdiff_plain;h=5a3641098c88d3c6ea0765df65b801312ecfb91b Introduce expand_options::expand_transcendental. In general expand() treats the argument as a rational expression (and leave transcendental functions as they are). However sometimes it's convenient to expand transcendental functions too, like log(a*b) = log(a) + log(b) exp(a + b) = exp(a)*exp(b) Applying such transformation by default doesn't seem to be a smart idea (think of log(p^2/mu^2) transformed to 2*log(p) - 2*log(mu)). Therefore introduce expand_options::expand_transcendental. As the name implies expand() tries to transform transcendental functions only if this flag is set. Signed-off-by: Vladimir V. Kisil --- diff --git a/ginac/flags.h b/ginac/flags.h index 3d398cf1..6da71b04 100644 --- a/ginac/flags.h +++ b/ginac/flags.h @@ -31,7 +31,8 @@ public: enum { expand_indexed = 0x0001, ///< expands (a+b).i to a.i+b.i expand_function_args = 0x0002, ///< expands the arguments of functions - expand_rename_idx = 0x0004 ///< used internally by mul::expand() + expand_rename_idx = 0x0004, ///< used internally by mul::expand() + expand_transcendental = 0x0008 ///< expands trancendental functions like log and exp }; };