Re: [GiNaC-devel] [GiNaC-list] Bug report
Hi,
On Thu, 23 Aug 2018 13:22:06 +0800 (GMT+08:00), 杨强 <acrobat@mail.ustc.edu.cn> said:
> Dear all, I use GiNaC to perform analytic calculation, but when I > try to use .numer() and .denom() methods, I get a wrong result. > 1. expr.numer()/expr.denom() is not always equal to the original > expression!!! 2. Using .numer_denom() method could always get the > correct answer. It is not actually a bug. Since a/b = (-a)/(-b), numer() and denom() are only defined up to a sign. Thus their separate evaluation may lead to expr.numer()/expr.denom() with the opposite sign to expr. I am proposing a patch to tutorial reminding that, Best wishes, Vladimir -- Vladimir V. Kisil http://www.maths.leeds.ac.uk/~kisilv/ Book: Geometry of Mobius Transformations http://goo.gl/EaG2Vu Software: Geometry of cycles http://moebinv.sourceforge.net/
participants (1)
-
Vladimir V. Kisil