Converts 64-bit signed integer to a double-precision floating point number.
using System;
class Int64BitsToDoubleDemo
{
const string formatter = "{0,20}{1,27:E16}";
public static void LongBitsToDouble( long argument )
{
double doubleValue;
doubleValue = BitConverter.Int64BitsToDouble( argument );
Console.WriteLine( formatter, String.Format( "0x{0:X16}", argument ), doubleValue );
}
public static void Main( )
{
LongBitsToDouble( 0 );
LongBitsToDouble( 0x0000FFFFFFFFFFFF );
}
}
Related examples in the same category