CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: 2kaud

Search: Search took 0.11 seconds.

  1. Replies
    4
    Views
    8,955

    Re: convert 8 bytes into double and back?

    One possible way of obtaining the id as a long long is



    #include <stdio.h>

    int main()
    {
    unsigned char id[] = {1,2,3,4,5,6,7,8};
  2. Replies
    4
    Views
    8,955

    Re: convert 8 bytes into double and back?

    The format of a double is described in
    http://en.wikipedia.org/wiki/Double-precision_floating-point_format

    Basically there are 52 bits for the fraction part, 11 bits for the exponent and 1 bit...
Results 1 to 2 of 3





Click Here to Expand Forum to Full Width

Featured