First time here? Check out the FAQ!

Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

answered 12 years ago

achrzesz gravatar image

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']])
click to hide/show revision 2
No.2 Revision

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]
click to hide/show revision 3
No.3 Revision

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]