On 01/21/2014 01:22 AM, Volker Braun wrote:
Your matrix easily exceeds the precision limit if the determinant is
computed naively.

sage: A.change_ring(RealIntervalField(53)).det()
0.?e10
sage: A.change_ring(RealIntervalField(60)).det()
0.?e8
sage: A.change_ring(RealIntervalField(80)).det()
1.68?e4
sage: A.change_ring(RealIntervalField(100)).det()
16801.79800?

B turns out to be correct since it uses a numerically more stable
algorithm. As a rule of thumb, computations with hardware floating point
numbers tend to be implemented best (at the cost of supporting only a
singe choice for precision)


On Monday, January 20, 2014 4:28:45 PM UTC, P Purkayastha wrote:

    Which of these outputs should we trust?


In the face of numerical instability you should trust neither ;-)

Thanks, Volker and Vincent. RDF seems to be the recommended field. :)

Would it be proper to autoconvert matrices over RR to RDF in case of the default precision, so that the more stable numerical algorithms from RDF can be used? I had proposed one such change in #13660 ( http://trac.sagemath.org/13660 ) in case of eigenvalue/eigenvector computations.

- basu.

--
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to