Bugs item #529310, was opened at 2002-03-12 23:35
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=376685&aid=529310&group_id=22866

Category: JBossCMP
Group: v3.0 Rabbit Hole
Status: Open
Resolution: None
Priority: 5
Submitted By: Mac (macearl)
Assigned to: Nobody/Anonymous (nobody)
Summary: Rounding error in CMP???

Initial Comment:
OS: Win2000
JDK: 1.3.1_01
Datastore: hypersonic

When updating using a java double to store monetary 
amounts. When I do an update deducting a valid 
monetary amount, say -300.64 from balance, I get a 
invalid monetary amount. Currently I have two account 
beans that have balances of 3250.9000000000005, and 
950.9000000000001 respectively.

I haven't had a lot of time to investigate this issue 
or to isolate the cause. It's not a high priority for 
me, but it could be an issue on high volume systems. 
But I thought I'd throw it out there and see if 
there's any interest.

To reproduce create an entity with a double field. Set 
value to some monetary number and then begin 
subtracting or adding monetary amounts.

Regards, Mac


----------------------------------------------------------------------

>Comment By: Mac (macearl)
Date: 2002-03-13 00:26

Message:
Logged In: YES 
user_id=479685

Some other features. It seems that the behavior on this 
rounding error is consistent. An identical set of 
operations in three seperate tests and got the same results 
each time.

3000.50 - 350.65 = 2649.85
3000.50 + 350.65 - 225.45 = 3125.7000000000003
500.00 + 225.45 = 725.45

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=376685&aid=529310&group_id=22866

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to