I think even Java would have a problem here as well. There is a limit on the number of decimal places that Number can parse. I think it is 15.
Java has a whole library of special classes to manipulate very large numbers like this. ActionScript doesn't appear to have as much support, but I did find this: http://code.google.com/p/as3crypto/source/browse/trunk/as3crypto/src/com/hu rlant/math/BigInteger.as -Alex On 1/16/14 3:26 AM, "Virat Patil" <[email protected]> wrote: >Sorry . kindly ignore previous test code. > >Test Code >var value:String="14999999999999999188.00"; >var formatter:NumberFormatter=new NumberFormatter(); >value =formatter.format(value); >trace(value); > >After trace the value i get is this "15,000,000,000,000,000,000" > >-----Original Message----- >From: Virat Patil >Sent: Thursday, January 16, 2014 4:39 PM >To: [email protected] >Subject: Number Formatter Query > >Hello > >I am trying to format value using number formatter. > >This is my test Code >var value:int="14999999999999999188.00"; >var formatter:NumberFormatter=new NumberFormatter(); value >=formatter.format(value); trace(value); > >After trace the value i get is this "15,000,000,000,000,000,000" > >It returns me above value. I think it is maximum number is there any >other way to so that I can get proper value. > > >Regards >Virat >MASTEK LTD. >In the US, we're called MAJESCOMASTEK > >~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >Opinions expressed in this e-mail are those of the individual and not >that of Mastek Limited, unless specifically indicated to that effect. >Mastek Limited does not accept any responsibility or liability for it. >This e-mail and attachments (if any) transmitted with it are confidential >and/or privileged and solely for the use of the intended person or entity >to which it is addressed. Any review, re-transmission, dissemination or >other use of or taking of any action in reliance upon this information by >persons or entities other than the intended recipient is prohibited. This >e-mail and its attachments have been scanned for the presence of computer >viruses. It is the responsibility of the recipient to run the virus check >on e-mails and attachments before opening them. If you have received this >e-mail in error, kindly delete this e-mail from desktop and server. >~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >
