RE: [Quickfix-developers] [qfj] double and not BigDecimal?
Brought to you by:
orenmnero
|
From: Steve B. <sb...@sm...> - 2006-03-16 20:42:28
|
Hi Graham, =20 For QFJ, doubles were used for QF JNI compatibility. In a future version of QFJ I'd be open to the possibility of using BigDecimals, but I'd want to do some performance analysis first. =20 IIRC, all the commercial Java FIX engines I've used also represented price-like data as doubles. Of course, that doesn't make it right. ;-) =20 Regards, =20 Steve =09 ________________________________ From: qui...@li... [mailto:qui...@li...] On Behalf Of Graham Miller Sent: Thursday, March 16, 2006 9:12 PM To: qui...@li... Subject: [Quickfix-developers] [qfj] double and not BigDecimal? =09 =09 =09 Why was the decision made to use doubles instead of BigDecimals when representing decimal data like prices? (I guess maybe this was something inherited from the old Java wrapper, but then the same can be asked about the Javfa wrapper). It seems like the BigDecimal exact representations would suit the application better, as dealing with rounding problems associated with doubles can be a pain. Of course arithmetic expressions are more straightforward using doubles in Java, but you can always get around that by converting to doubles before doing any calculations. Sitting here next to a stock ticker, I just saw that Ford is down .07000000000001 cents today. That's what I'm talking about. Thoughts?=20 =09 graham =09 =09 ________________________________ From: qui...@li... [mailto:qui...@li...] On Behalf Of Graham Miller Sent: Thursday, March 16, 2006 9:12 PM To: qui...@li... Subject: [Quickfix-developers] [qfj] double and not BigDecimal? =09 =09 Why was the decision made to use doubles instead of BigDecimals when representing decimal data like prices? (I guess maybe this was something inherited from the old Java wrapper, but then the same can be asked about the Javfa wrapper). It seems like the BigDecimal exact representations would suit the application better, as dealing with rounding problems associated with doubles can be a pain. Of course arithmetic expressions are more straightforward using doubles in Java, but you can always get around that by converting to doubles before doing any calculations. Sitting here next to a stock ticker, I just saw that Ford is down .07000000000001 cents today. That's what I'm talking about. Thoughts?=20 =09 graham =09 =09 |