[GiNaC-devel] Improving normalisation with negative exponents
    Vladimir V. Kisil 
    V.Kisil at leeds.ac.uk
       
    Tue Mar 30 14:45:08 CEST 2021
    
    
  
	Dear All,
	With version 1.8.0 of GiNaC the following code
 realsymbol x("x");
 ex e = (exp(2*t)-exp(-2*t))/(exp(t)-exp(-t));
 cout << e.normal() << endl;
   will through an exception
terminate called after throwing an instance of 'std::logic_error'
  what():  heur_gcd: not an integer polynomial [1]
  The reason is that internally e will be converted to something like
  (symbol457^2-symbol457^(-2))/(symbol457 - 1/symbol457)
  with non-polynomial numerator and denominator.
  I am attaching a patch which will fix this issue. Some additional
  tests are included as well.
  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-Improve-normalisation-of-negative-exponents.patch
Type: text/x-diff
Size: 2968 bytes
Desc: Normalisation patch.patch
URL: <http://www.ginac.de/pipermail/ginac-devel/attachments/20210330/424eaa38/attachment.bin>
    
    
More information about the GiNaC-devel
mailing list