/ swift Public
[SR-2626] String to Double conversion fails on "snan" input #45231
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
good first issue
Good for newcomers
Area: standard library umbrella
Additional Detail from JIRA
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: