{{Quickfixn}} Leading zeros on float datatypes
Grant Birchmeier
gbirchmeier at connamara.com
Thu Jan 17 10:00:42 PST 2013
Looks like you found a bug. There's no reason that we shouldn't be
able to interpret ".23".
Can you submit an issue?
-Grant
On Thu, Jan 17, 2013 at 11:55 AM, Campbell Wild
<campbellwild at thinkfolio.com> wrote:
> 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
>
> _______________________________________________
> Quickfixn mailing list
> Quickfixn at lists.quickfixn.com
> http://lists.quickfixn.com/listinfo.cgi/quickfixn-quickfixn.com
--
Grant Birchmeier
Connamara Systems, LLC
Made-To-Measure Trading Solutions.
Exactly what you need. No more. No less.
http://connamara.com
More information about the Quickfixn
mailing list