Skip to content

Instantly share code, notes, and snippets.

// .NET v4.6.1073.0 for x64 target on Windows 10
using System;
namespace NET_double_parse
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("{0:G1}", System.Double.Parse("2.4703282292062325e-324")); // 0 - correct
# Python 3.5.1 64-bit
print(float("2.4703282292062325e-324")) # 0 - correct
print(float("2.4703282292062326e-324")) # 0 - correct
print(float("2.4703282292062327e-324")) # 0 - correct
print(float("2.4703282292062328e-324")) # 5e-324 - correct