Uploaded image for project: 'MyFaces Trinidad'
  1. MyFaces Trinidad
  2. TRINIDAD-1124

numberconverter has issue with bigdecimal

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.0.9-core, 1.2.9-core
    • None
    • None

    Description

      Due to a potential bug in BigDecimal there is a bug, when you use BigDecimal
      with a NumberConverter.

      Like
      <tr:inputText value="#

      {bean.number}

      " ...>
      <tr:convertNumber />
      </tr:inputText>

      For instance, when the entered value is "333.111" the actual stored value is 333.1109999999999899955582804977893829345703125

      There is a mathematic explanation for that in here:
      http://en.wikipedia.org/wiki/Floating_point#Accuracy_problems

      Attachments

        Issue Links

          Activity

            People

              matzew Matthias Wessendorf
              matzew Matthias Wessendorf
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: