How do I enter a number for a dollar entry, say commission=2.40, and have it use THAT precision? My profit computations come out with precision .000000000000001 or .99999999999999 rather than two-decimal dollar number. That is, 7.20 comes out in my writelns as 7.199999999999999.
Announcement
Collapse
No announcement yet.
Dollar number entries - How to enter/use without high precision
Collapse
X
-
Hello Skippy,
You can use .toFixed(2) to set your number to 2 decimal places.
Example:
PHP Code:var num = 2.0000000000001
num = num.toFixed(2);
Jason K.
Project Manager
eSignal - an Interactive Data company
EFS KnowledgeBase
JavaScript for EFS Video Series
EFS Beginner Tutorial Series
EFS Glossary
Custom EFS Development Policy
New User Orientation
Comment