|
Replaced [_MSC_VER] tag with [MSVC] in Summary for consistency with other MSVC issues and abbreviated the rest of the text to make it more easily readable in reports.
The bit patterns for Infinities and NaNs are automatically detected in the INFINITY.cpp
I've tested the test sample above with native STL on 64-bit MSVC, and this sample has failed. The output was:
1 1 1 1 So now I think that this issue should be closed as Won't Fix. See also the tangentially related
Corrected Component/s: numeric_limits is in the Language Support library.
See also STDCXX-797 for a similar issue on HP-UX.
Lowered priority since now we don't using the sign of nan values in formatting (see STDCXX-51) and deferred to the later release.
Added 4.2.1 to affected versions.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
#include <float.h> #include <iostream> #include <limits> int main () { std::cout << _copysign (1., std::numeric_limits<double>::quiet_NaN ()) << '\n'; std::cout << _copysign (1., -std::numeric_limits<double>::quiet_NaN ()) << '\n'; std::cout << _copysign (1., std::numeric_limits<double>::signaling_NaN ()) << '\n'; std::cout << _copysign (1., -std::numeric_limits<double>::signaling_NaN ()) << '\n'; return 0; }The result in MSVC STL:
The result in stdcxx: