[
https://issues.apache.org/jira/browse/FLEX-25319?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Justin Mclean updated FLEX-25319:
---------------------------------
Labels: easyfix easytest (was: )
> NumberBase loses precision on large numbers
> -------------------------------------------
>
> Key: FLEX-25319
> URL: https://issues.apache.org/jira/browse/FLEX-25319
> Project: Apache Flex
> Issue Type: Bug
> Components: Formatters
> Affects Versions: Adobe Flex SDK 4.0 (Release)
> Environment: Affected OS(s): All OS Platforms
> Affected OS(s): All OS Platforms
> Language Found: English
> Reporter: Adobe JIRA
> Labels: easyfix, easytest
>
> Steps to reproduce:
> 1. Call formatThousands with a large number like
> 111111111111111111111111111111111
>
> Actual Results:
> Formatted as 111,111,111,111,111,000,000,000,000,000,000
>
>
> Expected Results:
> Formatted as 111,111,111,111,111,111,111,111,111,111,111
>
> Workaround (if any):
>
> replace
> var v:Number = Number(value);
>
> var isNegative:Boolean = (v < 0);
>
> var numStr:String = Math.abs(v).toString();
> with
> var isNegative:Boolean = (Number(value) < 0);
> var numStr:String = value;
> if (isNegative)
> numStr = numStr.substring(1);
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira