Ask Your Question

mike newman's profile - activity

2019-10-25 22:43:56 +0200 received badge  Famous Question (source)
2019-07-22 14:57:31 +0200 received badge  Popular Question (source)
2019-07-22 14:57:31 +0200 received badge  Notable Question (source)
2019-02-13 11:06:04 +0200 commented answer can i display only two decimals of precision

This accomplishes what I want; is there a way to apply this to displaying the entries of a matrix?

Ideally I would like to be able to set the "default" method for displaying floating point. At the moment the default (at least on my machine) seems to be to display every floating point number to 15 significant digits.

2019-02-13 10:57:45 +0200 commented answer can i display only two decimals of precision

Actually, yes, I want 0.0032 to display as 0.00 (not always of course, but in this case).

I have a bunch of values, and I want to see them all rounded off to the same decimal digit. They have different magnitudes, so asking for a number of significant digits is not the same thing. I am only talking about displaying them, not about actually rounding off the values for further calculation.

Yes I can compute the number of significant digits required for every number I wish to display, and then display it with that number of significant digits, but I was hoping for osme way of saying "Hey, Sagemath, can you please just display everything to two decimals for the moment!" :-)

2019-01-29 23:02:42 +0200 commented answer can i display only two decimals of precision

This gives 2 significant digits. Is it possible to get two digits after the decimal? So I'd like pi to display as 3.14 and I'd like 10*pi to display as 31.42.

2019-01-29 09:09:41 +0200 asked a question can i display only two decimals of precision

I have some lists I want to display. I don't want to limit the precision for the arithmetic that created them, I only want to limit the number of decimal places (not significant figures) that are displayed.

def f(n): return sorted([ 2*cos(2*3.14159*j/n) for j in range(n) ]) ;
f(5)

Gives me the five required values displayed with what seems to be 14 digits after the decimal. Is it possible to change 14 to some other value?