#13502: vector norm doesn't work with python integers
------------------------------+---------------------------------------------
   Reporter:  jason           |             Owner:  jason, was 
       Type:  defect          |            Status:  new        
   Priority:  major           |         Milestone:  sage-5.4   
  Component:  linear algebra  |          Keywords:             
Work issues:                  |   Report Upstream:  N/A        
  Reviewers:                  |           Authors:  Jason Grout
  Merged in:                  |      Dependencies:             
   Stopgaps:                  |  
------------------------------+---------------------------------------------
 Since there is a (1/p) calculation in the Cython file, if p is a python
 integer, that (1/p) is 0 (since 1 is also a python integer).

 This fix is to make the 1 in 1/p actually a Sage integer, which does the
 right thing.  The 1 is cached at the module level.

 Example of wrong behavior:

 {{{
 sage: v = vector(QQ, [1,2])
 sage: v.norm(int(2))
 1
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13502>
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