Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Use mpmath operations to mpmath matrices

M=mp.matrix([[2,0],[0,2]])
mp.inverse(M)             
matrix(
[['0.5', '0.0'],
 ['0.0', '0.5']])

Use mpmath operations to mpmath matrices

M=mp.matrix([[2,0],[0,2]])
mp.inverse(M)             
matrix(
[['0.5', '0.0'],
 ['0.0', '0.5']])

Yoy can also control precision in sage:

sage: m=matrix(RealField(100),[[2,0],[0,2]])
sage: m^-1
[0.50000000000000000000000000000 0.00000000000000000000000000000]
[0.00000000000000000000000000000 0.50000000000000000000000000000]

Use mpmath operations to mpmath matrices

M=mp.matrix([[2,0],[0,2]])
mp.inverse(M)             
matrix(
[['0.5', '0.0'],
 ['0.0', '0.5']])

Yoy You can also control precision in sage:Sage:

sage: m=matrix(RealField(100),[[2,0],[0,2]])
sage: m^-1
[0.50000000000000000000000000000 0.00000000000000000000000000000]
[0.00000000000000000000000000000 0.50000000000000000000000000000]