#12778: Incorrect coercion of matrix elements when from different rings
----------------------------------+-----------------------------------------
       Reporter:  kcrisman        |         Owner:  jason, was
           Type:  defect          |        Status:  new       
       Priority:  major           |     Milestone:  sage-5.0  
      Component:  linear algebra  |    Resolution:            
       Keywords:                  |   Work issues:            
Report Upstream:  N/A             |     Reviewers:            
        Authors:                  |     Merged in:            
   Dependencies:                  |      Stopgaps:            
----------------------------------+-----------------------------------------
Description changed by dsm:

Old description:

> {{{
>
> sage: M =
> matrix([[1,.9,1/5,x^2],[2,1.9,2/5,x^3],[3,2.9,3/5,x^4],[4,3.9,4/5,x^5]])
> sage: type(M)<type
> 'sage.matrix.matrix_symbolic_dense.Matrix_symbolic_dense'>
> sage: M[ 1.00000000000000 0.900000000000000 0.200000000000000
> x^2]
> [                2  1.90000000000000               2/5               x^3]
> [                3  2.90000000000000               3/5               x^4]
> [                4  3.90000000000000               4/5               x^5]
> sage: latex(M)\left(\begin{array}{rrrr}
> 1.00000000000000 & 0.900000000000000 & 0.200000000000000 & x^{2} \\
> 2 & 1.90000000000000 & \frac{2}{5} & x^{3} \\
> 3 & 2.90000000000000 & \frac{3}{5} & x^{4} \\
> 4 & 3.90000000000000 & \frac{4}{5} & x^{5}
> \end{array}\right)
> }}}
> Notice that the first row does something different to the entries than
> the others.

New description:

 {{{
 sage: M =
 matrix([[1,.9,1/5,x^2],[2,1.9,2/5,x^3],[3,2.9,3/5,x^4],[4,3.9,4/5,x^5]])
 sage: type(M)
 <type 'sage.matrix.matrix_symbolic_dense.Matrix_symbolic_dense'>
 sage: M
 [ 1.00000000000000 0.900000000000000 0.200000000000000               x^2]
 [                2  1.90000000000000               2/5               x^3]
 [                3  2.90000000000000               3/5               x^4]
 [                4  3.90000000000000               4/5               x^5]
 sage: latex(M)
 \left(\begin{array}{rrrr}
 1.00000000000000 & 0.900000000000000 & 0.200000000000000 & x^{2} \\
 2 & 1.90000000000000 & \frac{2}{5} & x^{3} \\
 3 & 2.90000000000000 & \frac{3}{5} & x^{4} \\
 4 & 3.90000000000000 & \frac{4}{5} & x^{5}
 \end{array}\right)

 }}}
 Notice that the first row does something different to the entries than the
 others.

--

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12778#comment:2>
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