#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, Rob Beezer
Author: Rob Beezer, Leif Leonhardy | Merged: sage-4.7.2.alpha3
Dependencies: #11848 |
--------------------------------------------+-------------------------------
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
> 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]
> 1.
> [attachment:trac_7852-fix_noisy_zero_error_in_matrix_double_dense.reviewer.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]
1.
[attachment:trac_7852-fix_noisy_zero_error_in_matrix_double_dense.reviewer.patch]
1.
[attachment:trac_7852-adjust_noisy_zero_term_threshold_for_polys.reviewer.patch]
to the Sage library.
--
Comment(by leif):
I've attached yet another patch slightly increasing one epsilon, since one
doctest still failed on MacOS X 10.6 (due to almost zero terms in a
polynomial).
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/7852#comment:18>
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.