# Receiving exponent in incoming value: Suggest Urgent

**URL:** <https://forum.fixtrading.org/t/receiving-exponent-in-incoming-value-suggest-urgent/9579>\
**Category:** General Q&A\
**Tags:** xid\_161036, imported, 41-changes\
**Created:** [July 5, 2011, 11:40am UTC](https://forum.fixtrading.org/t/receiving-exponent-in-incoming-value-suggest-urgent/9579 "2011-07-05T11:40:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tusharwankhede\_x](https://avatars.discourse-cdn.com/v4/letter/t/aeb1de/32.png) [@tusharwankhede\_x](https://forum.fixtrading.org/u/tusharwankhede_x)\
**Post date:** [July 5, 2011, 11:40am UTC](https://forum.fixtrading.org/t/receiving-exponent-in-incoming-value-suggest-urgent/9579/1 "2011-07-05T11:40:22Z")

</div>

Imported from previous forum

---

<div class="post-metadata">

**Author:** ![tusharwankhede\_x](https://avatars.discourse-cdn.com/v4/letter/t/aeb1de/32.png) [@tusharwankhede\_x](https://forum.fixtrading.org/u/tusharwankhede_x)\
**Post date:** [July 5, 2011, 11:40am UTC](https://forum.fixtrading.org/t/receiving-exponent-in-incoming-value-suggest-urgent/9579/2 "2011-07-05T11:40:22Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jorgthonnes](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.fixtrading.org/jorgthonnes/32/196_2.png) [@jorgthonnes](https://forum.fixtrading.org/u/jorgthonnes)\
**Post date:** [August 4, 2011, 7:27am UTC](https://forum.fixtrading.org/t/receiving-exponent-in-incoming-value-suggest-urgent/9579/3 "2011-08-04T07:27:32Z")

</div>

> 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

---

<div class="post-metadata">

**Author:** ![willhains\_x](https://avatars.discourse-cdn.com/v4/letter/w/94ad74/32.png) [@willhains\_x](https://forum.fixtrading.org/u/willhains_x)\
**Post date:** [August 5, 2011, 1:24am UTC](https://forum.fixtrading.org/t/receiving-exponent-in-incoming-value-suggest-urgent/9579/4 "2011-08-05T01:24:43Z")

</div>

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:

> **[Floating-point arithmetic](https://en.wikipedia.org/wiki/Floating_point#Accuracy_problems)**
>
> In computing, floating-point arithmetic (FP) is arithmetic on subsets of real numbers formed by a signed sequence of a fixed number of digits in some base, called a significand, scaled by an integer exponent of that base.
> Numbers of this form are called floating-point numbers.: 3 : 10 
> For example, the number 2469/200 is a floating-point number in base ten with five digits:
> 
>   
>     
>       
> 2469
>         
> /
>         
> 200
> =
> 12.345
> =
>         
> ...

[http://my.safaribooksonline.com/book/programming/java/9780137150021/general-programming/ch08lev1sec4](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
