On Thu, Jun 12, 2008 at 9:55 PM, Leonardo Uribe <[EMAIL PROTECTED]> wrote:
> BigDecimal converter could solve this problem, maybe this value is converted
> as double or float as is.

ok, the demo was a little bit to simple.
We want currency formatting etc. Means what the convertNumber actually does.

-Matthias

>
> regards
>
> Leonardo Uribe
>
> On Thu, Jun 12, 2008 at 11:45 PM, Matthias Wessendorf <[EMAIL PROTECTED]>
> wrote:
>>
>> Hi,
>>
>> perhaps someone of you knows a workaround for this:
>>
>> Take this JSP code:
>> <h:inputText value="#{bean.number}">
>>  <f:convertNumber />
>> </h:inputText>
>>
>> For instance, when the entered value is "333.111" the actual stored
>> value is 333.1109999999999899955582804977893829345703125
>>
>> I think the mathematic explanation for that in here:
>> http://en.wikipedia.org/wiki/Floating_point#Accuracy_problems
>>
>> My users want to have 333.111 instead of the accurate value...
>>
>> Any ideas?
>>
>> Thanks!
>>
>> --
>> Matthias Wessendorf
>>
>> further stuff:
>> blog: http://matthiaswessendorf.wordpress.com/
>> sessions: http://www.slideshare.net/mwessendorf
>> mail: matzew-at-apache-dot-org
>
>



-- 
Matthias Wessendorf

further stuff:
blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
mail: matzew-at-apache-dot-org

Reply via email to