[GiNaC-devel] Some more evaluation rules for abs()

Vladimir V. Kisil kisilv at maths.leeds.ac.uk
Tue Jul 30 20:25:15 CEST 2013


	Dear All,

  I have added some more evaluation rules for abs(). They evaluate
 absolute values of powers and exponents. Simple checks
 are added as well. The effect is like this:

  realsymbol a("a"), b("b"), x("x"), y("y");

  cout << abs(exp(x+I*y)).eval() << endl;
  // before: -> abs(exp(x+I*y))
  // now:    -> exp(x)

  cout << abs(pow(x+I*y,a+I*b)).eval() << endl;
  // before: -> abs((x+I*y)^(I*b+a))
  // now:    -> abs(x+I*y)^a

  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: 0005-Some-more-evaluation-rules-for-abs.patch
Type: text/x-diff
Size: 1534 bytes
Desc: Git patch
URL: <http://www.cebix.net/pipermail/ginac-devel/attachments/20130730/d6bd95d2/attachment.bin>


More information about the GiNaC-devel mailing list