#5384: [with patch and spkg, needs review] pynac symbolics gives very wrong
simplifications for simple expressions
-----------------------+----------------------------------------------------
Reporter: cwitty | Owner: burcin
Type: defect | Status: assigned
Priority: critical | Milestone: sage-3.4
Component: symbolics | Keywords:
-----------------------+----------------------------------------------------
Changes (by burcin):
* status: new => assigned
Comment:
There is a new pynac package which includes the fix for this here:
http://sage.math.washington.edu/home/burcin/pynac/pynac-0.1.3.spkg
To make the review easier, here is the patch for pynac
{{{
diff --git a/ginac/expairseq.cpp b/ginac/expairseq.cpp
--- a/ginac/expairseq.cpp
+++ b/ginac/expairseq.cpp
@@ -510,13 +510,6 @@
if (seq.size() != o.seq.size())
return (seq.size()<o.seq.size()) ? -1 : 1;
- // compare overall_coeff
- /*
- cmpval = overall_coeff.compare(o.overall_coeff);
- if (cmpval!=0)
- return cmpval;
- */
-
#if EXPAIRSEQ_USE_HASHTAB
GINAC_ASSERT(hashtabsize==o.hashtabsize);
if (hashtabsize==0) {
@@ -534,6 +527,11 @@
GINAC_ASSERT(cit1==last1);
GINAC_ASSERT(cit2==last2);
+ // compare overall_coeff
+ cmpval = overall_coeff.compare(o.overall_coeff);
+ if (cmpval!=0)
+ return cmpval;
+
return 0;
#if EXPAIRSEQ_USE_HASHTAB
}
}}}
attachment:trac_5384-pynac_compare_add.patch adds the example in the
description as a doctest.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5384#comment:2>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---