{{Quickfixn}} Leading zeros on float datatypes
Campbell Wild
campbellwild at thinkFolio.com
Thu Jan 17 09:55:11 PST 2013
The FIX specification defines the float datatype as follows:
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.").
Given that "23." is deemed a valid representation of a float, and it also states that leading zeros are optional, shouldn't ".23" be a valid representation for "0.23"?
Currently, this value is rejected by the engine with an "Incorrect data format for value" Reject message. However, the definition above seems a little vague, and I can't see why it should be rejected.
The reason I bring it up is because we have a vendor who keeps sending us floating point values starting with a decimal place, and I can't find hard evidence to say why this should not be allowed.
Thanks,
Campbell
More information about the Quickfixn
mailing list