Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python float precision

>>>pi=3.141592653589793238
>>> float("{:.12}".format(pi))
3.14159265359
>>> float("{:.6}".format(pi))
3.14159
 
PREVIOUS NEXT
Tagged: #python #float #precision
ADD COMMENT
Topic
Name
7+8 =