Uploaded image for project: 'Apache Flex'
  1. Apache Flex
  2. FLEX-15729

Adding values with precision

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Not A Problem
    • Adobe Flex SDK 2.0.1 (Release)
    • None
    • MXML Scripting
    • None
    • Affected OS(s): Windows
      Affected OS(s): Windows XP
      Browser: Internet Explorer 7.x
      Language Found: English

    Description

      Steps to reproduce:
      1.create an array collection with property amount having values with precision 2 e.g. 14.59, 12.99, 13.58
      2.use a for loop to calculate summation as amt = amt + myArrayCollection[i].amount
      3.trace/Alert the summation at each stage.

      Actual Results:
      0+76.39 = 76.39
      76.39+416.59 = 492.97999999999996 (this is actual result)

      Expected Results:

      Workaround (if any):
      used Number.toFixed method to truncate the precision.

      Attachments

        Activity

          People

            Unassigned Unassigned
            adobejira Adobe JIRA
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: