Re: [Quickfix-developers] Possible Rounding Errors
Brought to you by:
orenmnero
From: Jody H. <jod...@at...> - 2004-04-27 20:22:32
|
On Tue, 27 Apr 2004 15:08:22 -0500 Oren Miller <or...@qu...> wrote: > Here is what the FIX spec says: > > float: Sequence of digits with optional decimal point and sign > character (ASCII characters "", "0" - "9" and "."); the absence of > the decimal point within the string will be interpreted as the float > representation of an integer value. All float fields must accommodate > > up to fifteen significant digits. The number of decimal places used > should be a factor of business/market needs and mutual agreement > between counterparties. Note that float values may contain leading > zeros (e.g. _00023.23_ = _23.23_) and may contain or omit trailing > zeros after the decimal point (e.g. _23.0_ = _23.0000_ = _23_ = > "23."). Thanks, Oren. Does "fifteen significant digits" mean 15 digits in total, or after the decimal point? If the latter, then the example submitted should be parsed correctly since it has exactly 15 digits after the decimal (I'd even wager that the example comes from someone reading the spec and specifically using 15 digits). Unless exactly specified, there is always confusion over the scientific meaning of "significant digits" and the practical interpretation... |