[GiNaC-devel] BugFix: functions confused with exponent

Vladimir V. Kisil V.Kisil at leeds.ac.uk
Mon Aug 2 09:47:40 CEST 2021


	Dear All,

	Currently the following code in GiNaC

realsymbol x("x");
cout << (cos(x)/exp(x)).normal() << endl;

  prints value 1 with probability 50% (and the unmodified expression
  otherwise). I am attaching a one-line patch to fix this silly bug.

  Also I am attaching a previous patch which was not commented so
  far. The new method may be helpful from time to time but its
  equivalent in a user code would be much more involved due to the
  private nature of the relation class members.

  Best wishes,
  Vladimir
-- 
Vladimir V. Kisil                 http://www.maths.leeds.ac.uk/~kisilv/
  Book:      Geometry of Mobius Maps       https://doi.org/10.1142/p835
  Soft:      Geometry of cycles         http://moebinv.sourceforge.net/
  Jupyter notebooks:       https://github.com/vvkisil/MoebInv-notebooks

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-a-bug-in-normal-method.patch
Type: text/x-diff
Size: 1232 bytes
Desc: BugFix patch.patch
URL: <http://www.ginac.de/pipermail/ginac-devel/attachments/20210802/35721843/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Add-method-relational-canonical.patch
Type: text/x-diff
Size: 3000 bytes
Desc: Add memeber patch.patch
URL: <http://www.ginac.de/pipermail/ginac-devel/attachments/20210802/35721843/attachment-0001.bin>


More information about the GiNaC-devel mailing list