Summary from the original article
TL;DR: In .NET 11, double , float , and Half accept the "X" format and NumberStyles.HexFloat . You get the exact bits as readable text, like 0x1.3333333333334p-2 , and you can parse them straight back. This ships in .NET 11, which went GA on 2026-11-10. Everything below was run on the .NET 11 RC 1 SDK. The bug that prints fine Every .NET developer meets this pair of lines sooner or later: double sum = 0.1 + 0.2 ; Console…
By JKC ·
AI key points, how left, center and right framed this story, tone by side and loaded language are part of News.gg Premium.
Upgrade this serverTL;DR: In .NET 11, double , float , and Half accept the "X" format and NumberStyles.HexFloat . You get the exact bits as readable text, like 0x1.3333333333334p-2 , and you can parse them straight back. This ships in .NET 11, which went GA on 2026-11-10. Everything below was run on the .NET 11 RC 1 SDK. The bug that prints fine Every .NET developer meets this pair of lines sooner or later: double sum = 0.1 + 0.2 ; Console . WriteLine ( sum ) ; // 0.30000000000000004 Console . WriteLine ( sum == 0.3 ) ; // False So how far off is it? Decimal text cannot really tell you. It shows you a long tail…
23 hours ago · dev.to · You are reading this one