开发者

floating point number [duplicate]

This question already has answers here: Closed 11 years ago.

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜