FIX Trading Community

 

 Remember me

Register  |   Lost password?

4.1 Changes

Discussions > 4.1 Changes > Receiving exponent in incoming value: Suggest Urgent

Receiving exponent in incoming value: Suggest Urgent

Complete message thread from old site

Tushar Wankhede
1023 days ago,(2011/07/05)

Hi,
We have implemented a fix for receiving a message. The problem we are facing that we are receiving exponent value in on of our incoming message.
e.g. 9.99999999999446E-4

instead of it should be 0.0010.

what setting we need to do?

Please suggest!! its very urgent

Jörg Thönnes
994 days ago,(2011/08/04)

> Hi,
> We have implemented a fix for receiving a message. The problem we are facing that we are receiving exponent value in on of our incoming message.
> e.g. 9.99999999999446E-4
>
> instead of it should be 0.0010.
>
> what setting we need to do?
>
> Please suggest!! its very urgent

Numbers with exponents (...E-4) are not supported by the FIX protocol.
While your program formats these numbers in this way depends on your
programming language / library.

Cheers, Jörg

Will Hains
993 days ago,(2011/08/05)

It sounds like you are using a floating-point data type to read a decimal value. Floating-point types should not be used for this, especially in financial applications.

Some questions to confirm:
1. What programming language are you using?
2. Have you checked the actual FIX message (in text form)?
3. What data type are you using for the tag value?

References:
http://en.wikipedia.org/wiki/Floating_point#Accuracy_problems
http://my.safaribooksonline.com/book/programming/java/9780137150021/general-programming/ch08lev1sec4

If you are using Java, I recommend you use BigDecimal for all decimal number values.

Hope this helps!

Cheers,
Will.

> Hi,
> We have implemented a fix for receiving a message. The problem we are facing that we are receiving exponent value in on of our incoming message.
> e.g. 9.99999999999446E-4
>
> instead of it should be 0.0010.
>
> what setting we need to do?
>
> Please suggest!! its very urgent