Mark,
In continuing with my last email. 1.00 would be stored as 100 in an int.

-Richard
At 03:52 PM 4/30/2002 -0700, you wrote:
>Mark,
>To store decimal numbers or any currency for that matter as ints, you 
>store the values as the smallest unit of currency.  For dollars, this is 
>0.01 or a cent. You then can avoid any round off errors when doing 
>multiplication or division.
>
>Regards,
>
>Richard
>
>At 06:15 PM 4/30/2002 -0400, you wrote:
>>I'd be interested in how you can use ints for decimal numbers.  The "right"
>>way is to use BIG_DECIMAL, but I have to use the session bean method given
>>me for my bean data.  But this still does not address the issue of the
>><bean:write> behavior.
>>
>>Mark
>>
>>-----Original Message-----
>>From: Micael Padraig Og mac Grene [mailto:[EMAIL PROTECTED]]
>>Sent: Tuesday, April 30, 2002 6:00 PM
>>
>>First Principle of Economics: ever use float or double for money.  Use
>>ints.  Or, for serious money, longs.  'The real problem is not the "output"
>>but the whole idea.
>>
>>micael
>>
>>At 05:56 PM 4/30/02 -0400, you wrote:
>> >I'm using a simple <bean:write name="phone" property="price" /> which grabs
>> >a float price from the form bean.  The display, however, is unpredictable.
>> >For a price of 25.00, e.g., can get returns of "25.00," "25.0" and "25."
>> >Anybody else experiencing this behavior?  I've had to wrap the <bean:write>
>> >with JavaScript to get the formatting correct.
>> >
>> >Mark
>> >"De recta non tolerandum sunt."
>> >
>>
>>
>>
>>--
>>To unsubscribe, e-mail:
>><mailto:[EMAIL PROTECTED]>
>>For additional commands, e-mail:
>><mailto:[EMAIL PROTECTED]>
>>
>>--
>>To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
>>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>
>
>--
>To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to