1

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  {fix lc; long double cv;} ldblun;
Community
  • 1
  • 1

1 Answers1

1

BitConverter.DoubleToInt64Bits()

Then just shift and mask.

leppie
  • 115,091
  • 17
  • 196
  • 297