3 ms·
Floating-Point Parsing and Formatting Improvements in .Net Core 3.0
- jepler 8y agoI was a bit confused about the talk about the maximum length of floating point constant that must be parsed, but a test case cleared it up... https://github.com/dotnet/corefx/blob/master/src/Common/tests/System/RealParserTestsBase.netcoreapp.cs#L273 https://github.com/dotnet/corefx/blob/master/src/Common/test... The (760-character) string should parse as the smallest positive denormal number, but if even 1 of the trailing digits of the mantissa is deleted, the number should correctly parse to the double precision floating point value 0.0 instead. However, there are many much shorter string representations of this number possible, such as '5e-324'.