static void Frexp(double value, out double mantissa, out int exponent)
{
var bits = BitConverter.DoubleToInt64Bits(value);
var negative = (bits & (1L << 63)) != 0;
exponent = (int)((bits >> 52) & 0x7FFL);
Console.WriteLine("nt2: " + exponent);
var mantissaLong = bits & 0xFFFFFFFFFFFFFL;
if (exponent == 0)
{
exponent++;
}
else
{
mantissaLong |= 1L << 52;
}
exponent -= 1075;
if (mantissaLong == 0)
{
mantissa =