title: precision values discared in intBitsTofloat in C
body: <p>I have a double value =10.233387434223. I want to transmit it through network.
  I convert this value to int32 bits by using
  the following function  </p>
  
  <pre><code>    int floatToRawIntBits(float_t  x)
  {
    union {
      float_t f;  // assuming 32-bit IEEE 754 single-precision
      int32_t i;    // assuming 32-bit 2's complement int
          } u;
  
   u.f = x;
   return u.i;
  }
  </code></pre>
  
  <p>and then  I try to get back this by using the function </p>
  
  <pre><code>union int_float_bits {
      int64_t int_bits;
    float_t float_bits;
  };
  
  float_t intBitsToFloat:(int64_t x)
  {
      union int_float_bits bits;
      bits.int_bits = x;
      return bits.float_bits;
  }
  </code></pre>
  
  <p>The output is : 10.233387 .
  But I want to get back the original value 0f 10.233387434223 instead of 10.233387 .</p>
  
  <p>intBitsToDouble may be a possible solution or not ?</p>
  
  <p>I also try with these codes </p>
  
  <pre><code>int DoubleToRawIntBits(double_t  x)
  {
      union {
          double_t f;
          int64_t i;
      } u;
  
      u.f = x;
      return u.i;
  }
  </code></pre>
  
  <p>And </p>
  
  <pre><code>union int_double_bits {
      int64_t int_bits;
      double_t double_bits;
  };
  double_t intBitsToDouble(int64_t x)
  {
      union int_double_bits bits;
      bits.int_bits = x;
      return bits.double_bits;
  }
  </code></pre>
  
  <p>But here the result is 0.0000000. </p>
  
  <p>Please help me ,Thanks.</p>