On 10/26/12 6:25 AM, Volker Braun wrote:
The matrix is over RR (MPFR software floats). M.change_ring(RDF).det()
gives the right answer.

There is no special det() implementation for RR, we compute the
Hessenberg form and from that characteristic polynomial. Sage uses
Gaussian elimination to compute the Hessenberg form, and this is known
to be numerically unstable in unfavorable cases
(http://www.jstor.org/stable/2004967). I guess your matrix is one of
these cases; there is no overflow, its  a numerical instability.




Yep. If you're doing computations with numerical matrices, you should always use RDF or CDF matrices. In this case, RDF/CDF matrices use LU factorization and then compute the determinant from that, using the scipy.linalg.determinant function (which in turn uses LAPACK).

Thanks,

Jason



--
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To post to this group, send email to sage-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-devel+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel?hl=en.


Reply via email to