stdcxx-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Sebor (JIRA)" <j...@apache.org>
Subject [jira] Commented: (STDCXX-819) [MSVC] numeric_limits::quiet_NaN() and signaling_NaN() bits differ from native STL
Date Wed, 02 Apr 2008 15:11:26 GMT

    [ https://issues.apache.org/jira/browse/STDCXX-819?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12584626#action_12584626
] 

Martin Sebor commented on STDCXX-819:
-------------------------------------

The bit patterns for Infinities and NaNs are automatically detected in the [INFINITY.cpp|http://svn.apache.org/repos/asf/stdcxx/trunk/etc/config/src/INFINITY.cpp]
config test. There are many possible representations of both classes of numbers so if we want
to be completely consistent with the native STL (or with the C library on each platform) we'll
need to hardcode the exact patterns into the config test. Before we do that, it would be good
to do a survey of existing platforms and document the native bit patterns in a single place
(e.g., in this issue or, perhaps even better, on the [Wiki|http://wiki.apache.org/stdcxx/]).

> [MSVC] numeric_limits::quiet_NaN() and signaling_NaN() bits differ from native STL
> ----------------------------------------------------------------------------------
>
>                 Key: STDCXX-819
>                 URL: https://issues.apache.org/jira/browse/STDCXX-819
>             Project: C++ Standard Library
>          Issue Type: Bug
>          Components: 26. Numerics
>    Affects Versions: 4.1.2, 4.1.3, 4.1.4, 4.2.0
>         Environment: MSVC and ICC/Windows
>            Reporter: Farid Zaripov
>             Fix For: 4.2.1
>
>
> The binary representation of NAN's in stdcxx:
> {noformat}
> #define _RWSTD_FLT_QNAN_BITS  { 0, 0, '\xc0', '\xff' }
> #define _RWSTD_FLT_SNAN_BITS  { '\x1', 0, '\x80', '\x7f' }
> #define _RWSTD_DBL_QNAN_BITS  { 0, 0, 0, 0, 0, 0, '\xf8', '\xff' }
> #define _RWSTD_DBL_SNAN_BITS  { '\x1', 0, 0, 0, 0, 0, '\xf0', '\x7f' }
> #define _RWSTD_LDBL_QNAN_BITS  { 0, 0, 0, 0, 0, 0, '\xf8', '\xff' }
> #define _RWSTD_LDBL_SNAN_BITS  { '\x1', 0, 0, 0, 0, 0, '\xf0', '\x7f' }
> {noformat}
> The binary representation of the same things in MSVC STL:
> {noformat}
> #define _RWSTD_FLT_QNAN_BITS  { 0, 0, '\xc0', '\x7f' }
> #define _RWSTD_FLT_SNAN_BITS  { '\x1', 0, '\xc0', '\x7f' }
> #define _RWSTD_DBL_QNAN_BITS  { 0, 0, 0, 0, 0, 0, '\xf8', '\x7f' }
> #define _RWSTD_DBL_SNAN_BITS  { '\x1', 0, 0, 0, 0, 0, '\xf8', '\x7f' }
> #define _RWSTD_LDBL_QNAN_BITS  { 0, 0, 0, 0, 0, 0, '\xf8', '\x7f' }
> #define _RWSTD_LDBL_SNAN_BITS  { '\x1', 0, 0, 0, 0, 0, '\xf8', '\x7f' }
> {noformat}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message