Decimal fields

Imported from previous forum

Hello,
I have the next template for decimal:






For specification p.6.2.2 exponent is int32 and mantissa int64.

I have, for example the next input decimal value : exponent =0 and mantissa = 58350, if I am doing of encode for this decimal use rules for int32 and int64 I am receiving the next array of bites{[-128,3,71,-8]}. And this wrong result :(.
How I do test:

  • I have a original fast message
  • I am doing of decode of FAST messgage to FIX message
  • I am doing of encode of recived FIX message to FAST message
  • Equal result
    And input Array is equals to {[-127,3,71,-8]} , and output array is equals to {[-128,3,71,-8]}. What do I did wrong?

Maybe you missed subtracting 1? (see spec section 10.6.2)
(BTW, shouldn’t byte 4 be -18?)

Best,
Rolf

Hello, I have the next template for decimal:
For specification p.6.2.2 exponent is int32 and
mantissa int64.

I have, for example the next input decimal value : exponent =0 and
mantissa = 58350, if I am doing of encode for this decimal use rules for
int32 and int64 I am receiving the next array of bites{[-128,3,71,-8]}.
And this wrong result :(. How I do test:

  • I have a original fast message
  • I am doing of decode of FAST messgage to FIX message
  • I am doing of encode of recived FIX message to FAST message
  • Equal result And input Array is equals to {[-127,3,71,-8]} , and
    output array is equals to {[-128,3,71,-8]}. What do I did wrong?

I have not found any expression about subtracting 1 in section 10.6.2.
Yes, the last byte is -18 :);

Maybe you missed subtracting 1? (see spec section 10.6.2) (BTW,
shouldn’t byte 4 be -18?)

Best, Rolf

Hello, I have the next template for decimal:
For specification p.6.2.2 exponent
is int32 and mantissa int64.

I have, for example the next input decimal value : exponent =0 and
mantissa = 58350, if I am doing of encode for this decimal use rules
for int32 and int64 I am receiving the next array of bites{[-128,3,71,-
8]}. And this wrong result :(. How I do test:

  • I have a original fast message
  • I am doing of decode of FAST messgage to FIX message
  • I am doing of encode of recived FIX message to FAST message
  • Equal result And input Array is equals to {[-127,3,71,-8]} , and
    output array is equals to {[-128,3,71,-8]}. What do I did wrong?

exponent is nullable

I have not found any expression about subtracting 1 in section 10.6.2.
Yes, the last byte is -18 :);

Maybe you missed subtracting 1? (see spec section 10.6.2) (BTW,
shouldn’t byte 4 be -18?)

Best, Rolf

Hello, I have the next template for decimal:
For specification p.6.2.2
exponent is int32 and mantissa int64.

I have, for example the next input decimal value : exponent =0 and
mantissa = 58350, if I am doing of encode for this decimal use rules
for int32 and int64 I am receiving the next array of bites{[-128,3,71,-
8]}. And this wrong result :(. How I do test:

  • I have a original fast message
  • I am doing of decode of FAST messgage to FIX message
  • I am doing of encode of recived FIX message to FAST message
  • Equal result And input Array is equals to {[-127,3,71,-8]} , and
    output array is equals to {[-128,3,71,-8]}. What do I did wrong?

if the value is >= 0 you add 1 when encoding, subtract 1 when decoding
(sections 10.4, 10.6.1)

exponent is nullable

I have not found any expression about subtracting 1 in section 10.6.2.
Yes, the last byte is -18 :);

Maybe you missed subtracting 1? (see spec section 10.6.2) (BTW,
shouldn’t byte 4 be -18?)

Best, Rolf

Hello, I have the next template for decimal:
For specification p.6.2.2
exponent is int32 and mantissa int64.

I have, for example the next input decimal value : exponent =0 and
mantissa = 58350, if I am doing of encode for this decimal use
rules for int32 and int64 I am receiving the next array of bites{[-128,3,71,-
8]}. And this wrong result :(. How I do test:

  • I have a original fast message
  • I am doing of decode of FAST messgage to FIX message
  • I am doing of encode of recived FIX message to FAST message
  • Equal result And input Array is equals to {[-127,3,71,-8]} ,
    and output array is equals to {[-128,3,71,-8]}. What do I did
    wrong?

Thanks, I added conditional on optional (nullable) field and add 1 when encoding and subtract 1 when decoding, all work fine, Thanks.

if the value is >= 0 you add 1 when encoding, subtract 1 when decoding
(sections 10.4, 10.6.1)

exponent is nullable

I have not found any expression about subtracting 1 in section
10.6.2. Yes, the last byte is -18 :);

Maybe you missed subtracting 1? (see spec section 10.6.2) (BTW,
shouldn’t byte 4 be -18?)

Best, Rolf

Hello, I have the next template for decimal: For specification
p.6.2.2 exponent is int32 and mantissa int64.

I have, for example the next input decimal value : exponent =0
and mantissa = 58350, if I am doing of encode for this decimal
use rules for int32 and int64 I am receiving the next array of
bites{[-128,3,71,- 8]}. And this wrong result :(. How I do test:

  • I have a original fast message
  • I am doing of decode of FAST messgage to FIX message
  • I am doing of encode of recived FIX message to FAST message
  • Equal result And input Array is equals to {[-127,3,71,-8]} ,
    and output array is equals to {[-128,3,71,-8]}. What do I did
    wrong?