
- C# Basic Tutorial
- C# - Home
- C# - Overview
- C# - Environment
- C# - Program Structure
- C# - Basic Syntax
- C# - Data Types
- C# - Type Conversion
- C# - Variables
- C# - Constants
- C# - Operators
- C# - Decision Making
- C# - Loops
- C# - Encapsulation
- C# - Methods
- C# - Nullables
- C# - Arrays
- C# - Strings
- C# - Structure
- C# - Enums
- C# - Classes
- C# - Inheritance
- C# - Polymorphism
- C# - Operator Overloading
- C# - Interfaces
- C# - Namespaces
- C# - Preprocessor Directives
- C# - Regular Expressions
- C# - Exception Handling
- C# - File I/O
- C# Advanced Tutorial
- C# - Attributes
- C# - Reflection
- C# - Properties
- C# - Indexers
- C# - Delegates
- C# - Events
- C# - Collections
- C# - Generics
- C# - Anonymous Methods
- C# - Unsafe Codes
- C# - Multithreading
- C# Useful Resources
- C# - Questions and Answers
- C# - Quick Guide
- C# - Useful Resources
- C# - Discussion
Reinterpret 64-bit signed integer to a double-precision floating point number in C#
To reinterpret the specified 64-bit signed integer to a double-precision floating point number, the code is as follows −
Example
using System; public class Demo { public static void Main() { long d = 9846587687; Console.Write("Value (64-bit signed integer) = "+d); double res = BitConverter.Int64BitsToDouble(d); Console.Write("
Value (double-precision floating point number) = "+res); } }
Output
This will produce the following output −
Value (64-bit signed integer) = 9846587687 Value (double-precision floating point number) = 4.86486070491012E-314
Example
Let us see another example −
using System; public class Demo { public static void Main() { long d = 20; Console.Write("Value (64-bit signed integer) = "+d); double res = BitConverter.Int64BitsToDouble(d); Console.Write("
Value (double-precision floating point number) = "+res); } }
Output
This will produce the following output −
Value (64-bit signed integer) = 20 Value (double-precision floating point number) = 9.88131291682493E-323
- Related Articles
- Convert the specified double-precision floating point number to a 64-bit signed integer in C#
- Implicit conversion from 64-bit signed integer (long) to Decimal in C#
- Return the total elements in a sequence as a 64-bit signed integer in C#
- Signed floating point numbers
- How to deal with floating point number precision in JavaScript?
- What is the precision of floating point in C++?
- Implicit conversion from 8-bit signed integer (SByte) to Decimal in C#
- Convert Decimal to the equivalent 64-bit unsigned integer in C#
- Integer literals vs Floating point literals in C#
- Convert a floating point number to string in C
- Precision of floating point numbers in C++ (floor(), ceil(), trunc(), round() and setprecision())
- How to count set bits in a floating point number in C?
- Compute the bit-wise NOT of an array with signed integer type in Numpy
- Format floating point number in Java
- How to compile 32-bit program on 64- bit gcc in C and C++

Advertisements