Improving normalisation with negative exponents
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
participants (1)
-
Vladimir V. Kisil