Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript round to 8 decimal places

>>> parseFloat(0.9999999.toFixed(4));
1
>>> parseFloat(0.0009999999.toFixed(4));
0.001
>>> parseFloat(0.0000009999999.toFixed(4));
0
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #decimal #places
ADD COMMENT
Topic
Name
2+9 =