ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Tue, 29 Jan 2019 01:15:51 +0100can i display only two decimals of precisionhttps://ask.sagemath.org/question/45222/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?mike newmanTue, 29 Jan 2019 01:15:51 +0100https://ask.sagemath.org/question/45222/