I have a calculator app written in Flex/ActionScript 3 and I am struggling to understand some of parseFloat's behaviors. Any string containing a decimal value less than 0 with at least 4 places is returns as an exponent. Why does parseFloat behave this way and can I get the value as a float instead of an exponent?
parseFloat("0.004");
//returns 0.004 like I would expect
parseFloat("1.0004");
//returns 1.0004 like I would expect
parseFloat("0.0004");
//returns 4.0E-4 but I want 0.0004