[cfp-interest 3883] Re: convertFrom and signaling NaNs
RAJAN BHAKTA
rbhakta at us.ibm.com
Thu Apr 16 11:40:26 PDT 2026
Hi,
How to handle issues for C (WG14) are given at https://www.open-std.org/jtc1/sc22/wg14/issues/. Essentially you need to email the issue to c-issues at open-std.org.
You can email me or CFP directly (cc’d) as well for questions.
For this particular issue, I believe the value for the SNaN is the payload and that is unchanged. The operation still raises “invalid” as expected from any operation (including conversion) other than the very small set that explicitly do not do so (ex. The issignaling macro).
If you think it would be better to have something explicit there, we can propose a footnote or something that can make the exception explicit.
Regards,
Rajan Bhakta
CFP
From: Jan Schultke <janschultke at googlemail.com>
Date: Thursday, April 16, 2026 at 7:31 AM
To: RAJAN BHAKTA <rbhakta at us.ibm.com>
Subject: [EXTERNAL] Re: convertFrom and signaling NaNs
This Message Is From an Untrusted Sender
You have not previously corresponded with this sender.
Report Suspicious<https://us-phishalarm-ewt.proofpoint.com/EWT/v1/AdhS1Rd-!-XFVHHo80mE1PZhTJSWuWOGxGLDai057LMMBCjNHTQsFU8IpJD61furVABBcztm5GCl4VyzZ6hLveoVKde0X-_p3Wl5q7pMoajfHQJ0K0l4sCpA6XUZxWsA4_A$>
Looks like I got the email title wrong; it should be convertFormat.
Anyway, I've also opened a corresponding C++ issue here: https://github.com/cplusplus/CWG/issues/887<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_cplusplus_CWG_issues_887&d=DwMFaQ&c=BSDicqBQBDjDI9RkVyTcHQ&r=XTIN0AwPKAf2bIKNxlzdeqggAytE5h-JEusWpx9MXwc&m=pV23177dXmVMqVGCSGKn9nlIQN9n67aM69Vy2nFAmdLmMiN_Wp7S4nr2mhNWE_iB&s=1KoCv0e_i9m78mOZN9Ry5CQgjKoLcvWcX4CLxrirvs8&e=> The C wording is relatively similar.
On Thu, 16 Apr 2026 at 07:21, Jan Schultke <janschultke at googlemail.com<mailto:janschultke at googlemail.com>> wrote:
Hi,
There is something that struck me as odd in the C standard. I'm not a WG14 member, so this is my attempt at reporting the defect; please let me know if there's a better channel for doing so.
* §6.3.2.5 "Real floating types" specifies that the result is unchanged if possible.
* §F.3 "Operations" specifies that all conversions between ISO/IEC 60559 floating types are a "convertFormat" operation.
This seems like a contradiction because signaling NaN is not preserved by convertFormat, so the result is not the unchanged input value. Furthermore, implementations typically implement a conversion from float to double as CVTSS2SD, which does not preserve signaling NaNs, so it could be that the majority of implementations do not comply with §6.3.2.5 irrespective of Annex F compliance.
Jan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.oakapple.net/pipermail/cfp-interest/attachments/20260416/32f0d92c/attachment-0001.htm>
More information about the cfp-interest
mailing list