[GiNaC-devel] Simplifying powers

Vladimir V. Kisil kisilv at maths.leeds.ac.uk
Wed Oct 23 11:40:11 CEST 2013


	Dear Alexei,

	Many thanks for careful revision of proposed patches.

>>>>> On Wed, 16 Oct 2013 08:26:54 +0300, Alexei Sheplyakov <alexei.sheplyakov at 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 at 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Expansion-laws-for-exp-log-and-abs.patch
Type: text/x-diff
Size: 11538 bytes
Desc: Expand patch
URL: <http://www.cebix.net/pipermail/ginac-devel/attachments/20131023/717a0ba1/attachment.bin>


More information about the GiNaC-devel mailing list