floating point number [duplicate]
Possible Duplicate:
extracting mantissa and exponent from double in c#
How do you separate the fraction and the exponent in a floating point number?
In C++, I was able to use a "union", but unions are not allowed in C#.
union {开发者_StackOverflowfix lc; long double cv;} ldblun;
BitConverter.DoubleToInt64Bits()
Then just shift and mask.
精彩评论