Re: [GiNaC-devel] Simplifying powers
Dear Alexei, Many thanks for careful revision of proposed patches.
On Wed, 16 Oct 2013 08:26:54 +0300, Alexei Sheplyakov <alexei.sheplyakov@gmail.com> said:
ASh> I'm working on making the main part (power::expand) reasonably ASh> efficient (in particular when the basis has no positive terms ASh> at all). Just let me know if I can be useful in any way. ASh> possible a custom expand() for functions. However I don't quite ASh> like changes to log and exp functions. I think expand() should ASh> treat the argument as a rational expression (and leave ASh> transcendental functions as they are). Transforming ASh> log(p^2/mu^2) into 2*log(p) - 2*log(mu) as a side effect of ASh> expand() looks like a bad idea. On the other hand, if someone want automatic simplification for log(p/mu)+log(mu), this expansion is the simplest way. ASh> default behavior. Therefore I propose to add an extra expand ASh> option, say, expand_options::expand_transcendental, and apply ASh> log_expand (and exp_expand) only if that option specified. I have implemented this suggestion in the attached patch. I am not sure if expansion of the absolute value shall depend from the same flag. It seems, that abs() did not break rationality you mentioned above. Best wishes, Vladimir -- Vladimir V. Kisil email: kisilv@maths.leeds.ac.uk www: http://www.maths.leeds.ac.uk/~kisilv/ Book: Geometry of Mobius Transformations http://www.worldscientific.com/worldscibooks/10.1142/p835
participants (1)
-
Vladimir V. Kisil