On 10/26/2012 06:35 PM, LUIS BERLIOZ wrote:
det FUNCTION IS HAVING A VERY ANNOYING BEHAVIOR,GIVEN THE ATTACHED MATRIX FOR 
EXAMPLE
IF I TRY TO GET THE DETERMINANTS WITH TWO DIFFERENT METHODS:

sage: M=load(PATHTOFILE +'/M.sobj')
sage: M.det()
6.49037107316853e32
sage: from numpy import linalg
sage: linalg.det(M)
-1.5055380070396349e-05

THE SECOND RESULT IS CORRECT (THE MATRIX IS SINGULAR).
THE DEFAULT det FUNCTION SEEMS TO OVERFLOW WITh A MATRIX OF JUST 20 ROWS? IS 
THIS A BUG?

Maybe it is a precision problem? Changing the field seems to work:

sage: M = load('./M.sobj')
sage: A = M.change_ring(RealField(100)); A.det()
0.00000000000000000000000000000
sage: A = M.change_ring(RDF); A.det()
-2.51671904975e-05



--
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