none
IEEE 754 Double precision conversion: How do I calculate this in C++?

    Question

  • I  want to convert the Latitude of a 64 bit number to its  IEEE 754 double precision equivalent. 1 bit is the sign, 11 bits are the exponent, and 52 bits are the significand. Your help is greatly appreciated.
    Thursday, June 30, 2011 1:26 PM

Answers

  • I  want to convert the Latitude of a 64 bit number to its  IEEE 754 double precision equivalent. 1 bit is the sign, 11 bits are the exponent, and 52 bits are the significand. Your help is greatly appreciated.

    If you mean that you already have a 64 bit float number with 1 bit of sign, 11 bits of exponent and 52 bits of significand, then it is probably already in IEEE 754, so you don't have to worry about a conversion.

    If you mean you have it in some other format and want to get it to IEEE 754, then we would have to know what that other format is.

    AFIK, IEEE 754 is the only floating point format in widespread usage.  It is certainly what the PC uses. 

    • Marked as answer by Rob Pan Tuesday, July 05, 2011 9:00 AM
    Thursday, June 30, 2011 2:07 PM