[
https://issues.apache.org/jira/browse/TRINIDAD-1124?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12605469#action_12605469
]
Matthias Weßendorf commented on TRINIDAD-1124:
----------------------------------------------
Got feedback from Blake Sullivan:
I believe that the source of the problem is that we are always converting to
Double, which can lose information. The safe thing to do is to use
BigDecimal as our intermediate type, which is lossless.
> numberconverter has issue with bigdecimal
> -----------------------------------------
>
> Key: TRINIDAD-1124
> URL: https://issues.apache.org/jira/browse/TRINIDAD-1124
> Project: MyFaces Trinidad
> Issue Type: Bug
> Reporter: Matthias Weßendorf
> Assignee: Matthias Weßendorf
>
> 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
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.