Hi Simon, Linear Algebra is known to have issues over the p-adics in Sage. The generic algorithms used are mostly unaware of precision issues. Xavier Caruso has been working on improving Sage's Linear Algebra capabilities for example at https://trac.sagemath.org/ticket/23505 and https://trac.sagemath.org/ticket/23450. You might want to raise this issue again on the sage-padics list (https://groups.google.com/forum/#!forum/sage-padics)
julian On Tuesday, January 30, 2018 at 4:50:45 PM UTC+1, Simon Brandhorst wrote: > > The following may be a bug or me not understanding p-adic floating point > computations: > > > sage: R = Qp(2,type='floating-point',print_mode='terse') > sage: M = Matrix(R,4,[0, 0, 1, 1, 2^20, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1]) > sage: M.det() > 1048575 > sage: M.inverse() > --------------------------------------------------------------------------- > ZeroDivisionError Traceback (most recent call last > ) > .... > > ZeroDivisionError: input matrix must be nonsingular > > sage: M = Matrix(R,4,[0, 0, 1, 1, 2^19, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1]) > sage: M.inverse() > [ 1048575 2 0 1] > [274878955520 524288 1 1048575] > [ 524289 524287 1 524287] > [274877382656 524289 1048575 524289] > > Works. > -- 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 https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.
