#9880: Segfault in PyNaC 0.2.0.p4
-------------------------+--------------------------------------------------
   Reporter:  jpflori    |       Owner:  burcin      
       Type:  defect     |      Status:  needs_review
   Priority:  major      |   Milestone:  sage-4.6.2  
  Component:  symbolics  |    Keywords:  pynac       
     Author:             |    Upstream:  N/A         
   Reviewer:             |      Merged:              
Work_issues:             |  
-------------------------+--------------------------------------------------

Comment(by jpflori):

 Replying to [comment:24 vbraun]:

 > Burcin: If you are working on pynac, can you add some private
 function/method that exposes the GiNaC order to Sage in addition to the
 Sage (printing) order? Then we can add some randomized testing to make
 sure that both are strict weak orders.

 Calling the _cmp_ method of an expression should give you access to pynac
 internal ordering (i.e. with the patched spkg, it is GiNaC original
 ordering; with the old one you would get the modified order currently used
 by pynac).

 For example (with the new spkg):

 {{{
 sage: var('a b')
 (a, b)
 sage: x._cmp_(a)
 1
 sage: a._cmp_(b)
 1
 sage: a+b
 a + b
 sage: x+a
 a + x

 }}}
 In GiNaC order, vars are ordered according to creation order iirc. So here
 we have x (automatically created) > a > b.

 For printing, we use lexicographic order a > b > x and print bigger terms
 first.

 To check it the only current way is to look at what gets printed, the
 internal ordering is used for everything else.

 I'll try to post a minimal patch to have access to that order in sage.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9880#comment:25>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
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.

Reply via email to