4 ms·
There's no standard bit position for that flag, unfortunately, or even a standard interpretation (flag set -> quiet/signaling). A NaN just have to have at leas
by pklausler 5y ago
There's no standard bit position for that flag, unfortunately, or even a standard interpretation (flag set -> quiet/signaling). A NaN just have to have at least one bit set in its significand to distinguish the NaN from an infinity.
(So the fact that a binary value is a NaN is portable, but not the distinction between qNaN and sNaN.)
- dbaupp 5y agoI think that’s not the full story. The standard says: A quiet NaN bit string should be encoded with the first bit (d1) of the trailing significand field T being 1. A signaling NaN bit string should be encoded with the first bit of the trailing significand field being 0 That does use “should” (not “shall”) and is described as a “preferred encoding”, so it’s standards-compliant to do something else, but it’s not recommended.