Uploaded image for project: 'C++ Standard Library'
  1. C++ Standard Library
  2. STDCXX-819

[MSVC] numeric_limits::quiet_NaN() and signaling_NaN() bits differ from native STL

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 4.1.2, 4.1.3, 4.1.4, 4.2.0, 4.2.1
    • 4.2.2
    • 18. Language Support
    • None
    • MSVC and ICC/Windows

    • Incorrect Behavior

    Description

      The binary representation of NAN's in stdcxx:

      #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' }
      

      The binary representation of the same things in MSVC STL:

      #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' }
      

      Attachments

        Issue Links

          Activity

            People

              sebor Martin Sebor
              farid Farid Zaripov
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - 4h
                  4h
                  Remaining:
                  Remaining Estimate - 4h
                  4h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified