You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by Saju Thankathurai <sa...@gmail.com> on 2014/10/21 08:39:04 UTC
NumberFormatter rounding huge value even if rounding is set to "none".
Hi,
I need to format a huge value using NumberFormatter. The rounding is set to
"none". But Still the value is rounded.
I need to add precision to value 5621633088425998336. So i set precision 4
to numberformatter and trying to format the value.
It is returning 5621633088425998300.0000. Value 36 is missed out after
formatting the value.
Any suggestions to get the real value without rounding ?
--
Regards
Saju Thankathurai,
Re: NumberFormatter rounding huge value even if rounding is set to "none".
Posted by Justin Mclean <ju...@classsoftware.com>.
Hi,
Number use IEEE floating point representation which I believe has a maximum of 21 digits precision. From memory the way the NumberFormatter works means you loose a few more digits so only get 18 or so digits, also from memory mx:NumberFormatter and s:NumberFormater work slightly differently.
Thanks,
Justin
Re: NumberFormatter rounding huge value even if rounding is set to
"none".
Posted by Tom Chiverton <tc...@extravision.com>.
What's the datatype of that variable ?
It looks to be greater than the maximum for a uint 4,294,967,295
(2^32-1), for instance ?
Ref:
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/uint.html
Tom
On 21/10/14 07:39, Saju Thankathurai wrote:
> Hi,
>
> I need to format a huge value using NumberFormatter. The rounding is set to
> "none". But Still the value is rounded.
>
> I need to add precision to value 5621633088425998336. So i set precision 4
> to numberformatter and trying to format the value.
>
> It is returning 5621633088425998300.0000. Value 36 is missed out after
> formatting the value.
>
> Any suggestions to get the real value without rounding ?
>
> --
> Regards
>
> Saju Thankathurai,
>
>
> ______________________________________________________________________
> This email has been scanned by the Symantec Email Security.cloud service.
> For more information please visit http://www.symanteccloud.com
> ______________________________________________________________________