Numerical Conversion in C/C++
问题 I need to convert a C/C++ double to a 64 bit two's complement, where the Radix point is at bit number 19 (inclusive). This means that for the format I want to convert to 0x0000 0000 0010 0000 is the number 1 0xFFFF FFFF FFF0 0000 is the number -1 0x0000 0000 0000 0001 is 0.95 x 10^-6 0xFFFF FFFF FFFF FFFF is -0.95 x 10^-6 So far I've though about using the modf function from the C standard library, but that doesn't really cover my needs. I've also looked at some type conversion classes in