ASKSAGE: Sage Q&A Forum - Latest question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Wed, 29 Sep 2010 09:37:13 -0500Changing number of decimal digits displayed in outputhttp://ask.sagemath.org/question/7713/changing-number-of-decimal-digits-displayed-in-output/I am doing some computations with large matrices over the complex numbers. When these matrices are outputted, the entries appear, for example, as
[ 0.03661165235? - 0.08838834765?*I 0.21338834765? + 0.08838834765?*I 0.03661165235? + 0.08838834765?*I etc
I would like to change it so that the output only displays each entry to 3 decimal places, so that they are easier to see. Is there a way to do this? Is there a way to do this that doesn't alter the number of digits stored? For reference, my input is
P8 = diagonal_matrix([1,1,1,0,0,0,0,1,1,0,0,0, 0,1,1,1])
U*P8*U.inverse()
where U is a previously defined matrix with complex entries.
Thanks!slearchWed, 29 Sep 2010 09:37:13 -0500http://ask.sagemath.org/question/7713/