NULL representation for scaled number

Imported from previous forum

Hi,

It seems to me that there are 2 different definition for the NULL representation of NULL value for a scaled number.

  1. FAST Transfer Encoding Protocol 1.0.2 says ( in section 2.1.2):
    “As scaled numbers have a separate mechanism for representing NULL, the mantissa and exponent parts are represented using signed integers without NULL support.
    An exponent of -64 (10-64) indicates a NULL value.”

  2. FAST specification 1.1 says ( in section 10.6.2 ):
    “If a scaled number is nullable, the exponent is nullable and the mantissa is non-nullable. A NULL scaled number is represented as a NULL exponent. The mantissa is present in the stream iff the exponent is not NULL.”

Since the exponent is a signed integer, a NULL exponent should be represented as 0x80, according to Section 10.6.1.

So which one is correct, 0xc0(-64) or 0x80(0)? or both?

Thanks in advance.

Andy,

The FAST 1.1 specification is what you should be following.
http://www.fixprotocol.org/fastspec

The Transfer Encoding documentation is now outdated. All NULL value representations were normalized to 0x00.

“10.4 Nullability
Each field has a type that has a nullability property. If a type is nullable, there is a special representation of a NULL value. When a type is non-nullable, no representation for NULL is reserved. All nullable types are constructed in such a way that NULL is represented as a 7-bit entity value where all bits are zero. It is represented as 0x80 when stop bit encoded.”

So, A NULL scaled number is represented as a NULL exponent and the mantissa is not present in the stream. So it will be just 1 byte in the stream, Simply 0x80 with the stop bit set.

There is a past thread that discusses your exact question:
http://www.fixprotocol.org/discuss/read/e88db66a

Daniel

Hi,

It seems to me that there are 2 different definition for the NULL
representation of NULL value for a scaled number.

  1. FAST Transfer Encoding Protocol 1.0.2 says ( in section 2.1.2):
    “As scaled numbers have a separate mechanism for representing
    NULL, the mantissa and exponent parts are represented using signed
    integers without NULL support. An exponent of -64 (10-64)
    indicates a NULL value.”

  2. FAST specification 1.1 says ( in section 10.6.2 ): “If a scaled
    number is nullable, the exponent is nullable and the mantissa is non-
    nullable. A NULL scaled number is represented as a NULL exponent. The
    mantissa is present in the stream iff the exponent is not NULL.”

Since the exponent is a signed integer, a NULL exponent should be
represented as 0x80, according to Section 10.6.1.

So which one is correct, 0xc0(-64) or 0x80(0)? or both?

Thanks in advance.