Closed IGMikeS closed 4 years ago
@tannergooding
This was updated to be IEEE 754 compliant for .NET Core 3.0. The correct behavior is that values are parsed to the "infinitely precise" value and then rounded to the "nearest representable" result (which in this case is Infinity
).
The new behavior is correct, compliant, and expected.
I'm going to close this @IGMikeS . Feel free to reopen if you have more questions.
Okay, thanks for the info. :)
.NET Core Version: Version: 3.0.100-preview6-012264 - I think. VS2019 apparently hides the NetCore packages, now, so I am not 100% sure. Have you experienced this same bug with .NET Framework?: No
Run the following code: var text = "123e466"; var provider = new CultureInfo("en-US"); double value;
Results in DotNetFramework: success = false value = 0
Results in NetCore: success = true value = double.Infinity
It seems to me that the original .Net Framework results were correct. "123e466" exceeds the bounds of a double, but it should fail to parse, not return Infinity.