[SR-2626] String to Double conversion fails on "snan" input #45231
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
good first issue
Good for newcomers
standard library
Area: standard library umbrella
Additional Detail from JIRA
md5: ba2c6f38b18ec9c711fa49aecc0453e6
Issue Description:
The string -> floating-point intializer doesn’t allow you to create signaling NaN values. In the following code, y == nil, but should have the same value as x:
This relates to section 5.12.1 of IEEE 754:
Conversion of an external character sequence “snan” (regardless of case) with an optional preceding sign, to a supported format should either produce a signaling NaN or else produce a quiet NaN and signal the invalid operation exception.
The text was updated successfully, but these errors were encountered: