Hi there, I'm a regular user of GiNaC through PyNaC and Sage and I'm usually very happy with it. Good work guys ! However during on of my class I was quite surprised by a result from Sage. I've been able to trace back the result to GiNaC so I'd like to report it here. Note that it's the first time I go into the arcane of GiNaC so I may be wrong. Here is a code that reproduce the problem: #include <iostream> #include <ginac/ginac.h> using namespace std; using namespace GiNaC; int main() { symbol x("x"); ex poly; poly = sqrt(x*x+1)*sqrt(x+1); cout << poly << endl; cout << poly.is_polynomial(x) << endl; return 0; } The output is: popcorn-*/Sage-Work/GiNaC $ ./ginac sqrt(1+x)*sqrt(1+x^2) 1 so that sqrt(1+x)*sqrt(1+x^2) is considered as a polynomial in x ! Here are the standard info: I just installed cln-1.3.2.tar.bz2 and ginac-1.5.8.tar.bz2 from the sources. I'm using: popcorn-~/install $ c++ --version c++ (SUSE Linux) 4.5.0 20100604 [gcc-4_5-branch revision 160292] In a popcorn-~/install $ uname -a Linux popcorn.rouba.net 2.6.34.7-0.7-desktop #1 SMP PREEMPT 2010-12-13 11:13:53 +0100 x86_64 x86_64 x86_64 GNU/Linux Cheers, Florent Hivert
Hi, Am 19.05.2011 23:35, schrieb Florent Hivert:
However during on of my class I was quite surprised by a result from Sage. I've been able to trace back the result to GiNaC so I'd like to report it here. Note that it's the first time I go into the arcane of GiNaC so I may be wrong.
thanks for reporting the bug. I am about to fix it. Regards, Jens
Dear Jens, Thanks for your quick answer.
Am 19.05.2011 23:35, schrieb Florent Hivert:
However during on of my class I was quite surprised by a result from Sage. I've been able to trace back the result to GiNaC so I'd like to report it here. Note that it's the first time I go into the arcane of GiNaC so I may be wrong.
thanks for reporting the bug. I am about to fix it.
Excellent ! Please ping me either on this list or directly when you have the fix, so that we (ie: the Sage dev team) can decide either to backport it or to upgrade GiNaC. All the best, Florent
Hi! On 05/20/2011 08:24 PM, Florent Hivert wrote:
Am 19.05.2011 23:35, schrieb Florent Hivert:
However during on of my class I was quite surprised by a result from Sage. I've been able to trace back the result to GiNaC so I'd like to report it here. Note that it's the first time I go into the arcane of GiNaC so I may be wrong.
thanks for reporting the bug. I am about to fix it.
Excellent ! Please ping me either on this list or directly when you have the fix, so that we (ie: the Sage dev team) can decide either to backport it or to upgrade GiNaC.
Ping. Generally, it is best to open a ticket in Sage trac, so you can be sure the problem is going to be fixed. This is because as far as I know patches for GiNaC don't automatically propagate to Pynac. Anyway, in this case you'll have to port these two patches to Pynac: <http://www.ginac.de/ginac.git?p=ginac.git;a=commitdiff;h=0c2f0f4c6d> <http://www.ginac.de/ginac.git?p=ginac.git;a=commitdiff;h=293ff6f6fe> Cheers -richy. -- Richard B. Kreckel <http://www.ginac.de/~kreckel/>
Hi,
thanks for reporting the bug. I am about to fix it.
Excellent ! Please ping me either on this list or directly when you have the fix, so that we (ie: the Sage dev team) can decide either to backport it or to upgrade GiNaC.
Ping.
Wow ! That's a blazingly fast fix !
Generally, it is best to open a ticket in Sage trac, so you can be sure the problem is going to be fixed. This is because as far as I know patches for GiNaC don't automatically propagate to Pynac.
Of course ! See <http://trac.sagemath.org/sage_trac/ticket/11352> Ticket #11352 (is_polynomial returns wrong results) Opened 31 hours ago
Anyway, in this case you'll have to port these two patches to Pynac: <http://www.ginac.de/ginac.git?p=ginac.git;a=commitdiff;h=0c2f0f4c6d> <http://www.ginac.de/ginac.git?p=ginac.git;a=commitdiff;h=293ff6f6fe>
I'm copy this info to sage trac ticket and waiting for symbolic guys to decide what to do further with PyNaC. Thanks a lot. Cheers, Florent
participants (3)
-
Florent Hivert
-
Jens Vollinga
-
Richard B. Kreckel