#7852: solve_left for RDF matrices is WRONG
-------------------------------+--------------------------------------------
    Reporter:  was             |         Owner:  was                        
        Type:  defect          |        Status:  closed                     
    Priority:  blocker         |     Milestone:  sage-4.7.2                 
   Component:  linear algebra  |    Resolution:  fixed                      
    Keywords:                  |   Work_issues:                             
    Upstream:  N/A             |      Reviewer:  Martin Raum, Leif Leonhardy
      Author:  Rob Beezer      |        Merged:  sage-4.7.2.alpha3          
Dependencies:  #11848          |  
-------------------------------+--------------------------------------------
Changes (by leif):

  * reviewer:  Martin Raum => Martin Raum, Leif Leonhardy


Old description:

> Observe the docstring for solve_left for an RDF matrix:
> {{{
> sage: A = random_matrix(RDF,3)
> sage: A.solve_left?
> Solve the equation A*x = b, where
>
>         EXAMPLES:
>             sage: A = matrix(RDF, 3,3, [1,2,5,7.6,2.3,1,1,2,-1]); A
>             [ 1.0  2.0  5.0]
>             [ 7.6  2.3  1.0]
>             [ 1.0  2.0 -1.0]
>             sage: b = vector(RDF,[1,2,3])
>             sage: x = A.solve_left(b); x
>             (-0.113695090439, 1.39018087855, -0.333333333333)
>             sage: A*x
>             (1.0, 2.0, 3.0)
> }}}
>
> But that is solve_right.
>
> This was evidently introduced by maybe Grout's "Switch the RDF and CDF
> matrices to a numpy 1.2 backend; factor out common functionality to
> matrix_double_dense.pyx.".
>
> Reported by Stephanie Dietzel
>
> ----
>
> Apply [attachment:trac_7852-solve-linear-systems-CDF.patch] to the Sage
> library.

New description:

 Observe the docstring for solve_left for an RDF matrix:
 {{{
 sage: A = random_matrix(RDF,3)
 sage: A.solve_left?
 Solve the equation A*x = b, where

         EXAMPLES:
             sage: A = matrix(RDF, 3,3, [1,2,5,7.6,2.3,1,1,2,-1]); A
             [ 1.0  2.0  5.0]
             [ 7.6  2.3  1.0]
             [ 1.0  2.0 -1.0]
             sage: b = vector(RDF,[1,2,3])
             sage: x = A.solve_left(b); x
             (-0.113695090439, 1.39018087855, -0.333333333333)
             sage: A*x
             (1.0, 2.0, 3.0)
 }}}

 But that is solve_right.

 This was evidently introduced by maybe Grout's "Switch the RDF and CDF
 matrices to a numpy 1.2 backend; factor out common functionality to
 matrix_double_dense.pyx.".

 Reported by Stephanie Dietzel

 ----

 Apply
  1. [attachment:trac_7852-solve-linear-systems-CDF.patch]
  1.
 [attachment:trac_7852-fix_noise_errors_in_preparser_examples.reviewer.patch]
  1. [attachment:trac_7852-fix_noise_errors_in_polys.reviewer.patch]
 to the Sage library.

--

Comment:

 Attached two reviewer patches fixing doctest errors on some systems.

 Third patch to fix doctest errors in `sage/matrix/matrix_double_dense.pyx`
 coming soon.

 The patch to the preparser examples requires #11848.

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