Issue Details (XML | Word | Printable)

Key: STDCXX-464
Type: Bug Bug
Status: Resolved Resolved
Resolution: Won't Fix
Priority: Minor Minor
Assignee: Martin Sebor
Reporter: Martin Sebor
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
C++ Standard Library

[HP-UX 11.23] std::num_put drops sign from negative long double NaN

Created: 29/Jun/07 02:07 AM   Updated: 07/Apr/08 12:13 AM
Component/s: 22. Localization
Affects Version/s: 4.1.3, 4.2.0
Fix Version/s: 4.2.1

Time Tracking:
Original Estimate: 4h
Original Estimate - 4h
Remaining Estimate: 3h
Time Spent - 1h Remaining Estimate - 3h
Time Spent: 1h
Time Spent - 1h Remaining Estimate - 3h

Environment: HP-UX 11.23 and prior
Issue Links:
Reference
 
dependent
 

Severity: Incorrect Behavior
Resolution Date: 25/Mar/08 05:27 PM


 Description  « Hide
On HP-UX 11.23 and prior versions of the OS negative long double NaN is formatted without the minus sign:
$ uname -sr && cat t.cpp && nice gmake t && ./t
HP-UX B.11.23
#include <cassert>
#include <iostream>
#include <limits>
#include <sstream>

int main ()
{
    std::ostringstream os;
    os << std::numeric_limits<double>::quiet_NaN () << " == "
       << std::numeric_limits<long double>::quiet_NaN () << '\n'
       << -std::numeric_limits<double>::quiet_NaN () << " == "
       << -std::numeric_limits<long double>::quiet_NaN ();

    std::cout << os.str () << '\n';
    assert (os.str () == "nan == nan\n-nan == -nan");
}
aCC -c -I/amd/devco/sebor/stdcxx/include/ansi -I/usr/include  -D_RWSTDDEBUG    -I/amd/devco/sebor/stdcxx/include -I/build/sebor/stdcxx-aCC-3.73-11s/include -I/amd/devco/sebor/stdcxx/examples/include  -Aa +nostl  -g +d  +w +W392 +W655 +W684 +W818 +W819 +W849   t.cpp
aCC t.o -o t -Aa +nostl -Wl,+s -Wl,+vnocompatwarnings    -L/build/sebor/stdcxx-aCC-3.73-11s/lib  -lstd11s  -lm 
nan == nan
-nan == nan
Assertion failed: os.str () == "nan == nan\n-nan == -nan", file t.cpp, line 15
ABORT instruction (core dumped)


 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Martin Sebor made changes - 29/Jun/07 02:08 AM
Field Original Value New Value
Link This issue depends upon STDCXX-463 [ STDCXX-463 ]
Martin Sebor made changes - 09/Jul/07 12:51 AM
Link This issue is related to STDCXX-51 [ STDCXX-51 ]
Martin Sebor made changes - 23/Aug/07 03:57 PM
Priority Major [ 3 ] Minor [ 4 ]
Affects Version/s 4.2 [ 12311945 ]
Fix Version/s 4.2.1 [ 12312690 ]
Martin Sebor made changes - 01/Feb/08 04:29 AM
Description On HP-UX 11.23 and prior versions of the OS negative long double NaN is formatted without the minus sign:

$ uname -sr && cat t.cpp && nice gmake t && ./t
HP-UX B.11.23
#include <cassert>
#include <iostream>
#include <limits>
#include <sstream>

int main ()
{
    std::ostringstream os;
    os << std::numeric_limits<double>::quiet_NaN () << " == "
       << std::numeric_limits<long double>::quiet_NaN () << '\n'
       << -std::numeric_limits<double>::quiet_NaN () << " == "
       << -std::numeric_limits<long double>::quiet_NaN ();

    std::cout << os.str () << '\n';
    assert (os.str () == "nan == nan\n-nan == -nan");
}
aCC -c -I/amd/devco/sebor/stdcxx/include/ansi -I/usr/include -D_RWSTDDEBUG -I/amd/devco/sebor/stdcxx/include -I/build/sebor/stdcxx-aCC-3.73-11s/include -I/amd/devco/sebor/stdcxx/examples/include -Aa +nostl -g +d +w +W392 +W655 +W684 +W818 +W819 +W849 t.cpp
aCC t.o -o t -Aa +nostl -Wl,+s -Wl,+vnocompatwarnings -L/build/sebor/stdcxx-aCC-3.73-11s/lib -lstd11s -lm
nan == nan
-nan == nan
Assertion failed: os.str () == "nan == nan\n-nan == -nan", file t.cpp, line 15
ABORT instruction (core dumped)
On HP-UX 11.23 and prior versions of the OS negative long double NaN is formatted without the minus sign:

{code}
$ uname -sr && cat t.cpp && nice gmake t && ./t
HP-UX B.11.23
#include <cassert>
#include <iostream>
#include <limits>
#include <sstream>

int main ()
{
    std::ostringstream os;
    os << std::numeric_limits<double>::quiet_NaN () << " == "
       << std::numeric_limits<long double>::quiet_NaN () << '\n'
       << -std::numeric_limits<double>::quiet_NaN () << " == "
       << -std::numeric_limits<long double>::quiet_NaN ();

    std::cout << os.str () << '\n';
    assert (os.str () == "nan == nan\n-nan == -nan");
}
{code}
{noformat}
aCC -c -I/amd/devco/sebor/stdcxx/include/ansi -I/usr/include -D_RWSTDDEBUG -I/amd/devco/sebor/stdcxx/include -I/build/sebor/stdcxx-aCC-3.73-11s/include -I/amd/devco/sebor/stdcxx/examples/include -Aa +nostl -g +d +w +W392 +W655 +W684 +W818 +W819 +W849 t.cpp
aCC t.o -o t -Aa +nostl -Wl,+s -Wl,+vnocompatwarnings -L/build/sebor/stdcxx-aCC-3.73-11s/lib -lstd11s -lm
nan == nan
-nan == nan
Assertion failed: os.str () == "nan == nan\n-nan == -nan", file t.cpp, line 15
ABORT instruction (core dumped)
{noformat}
Severity Incorrect Behavior
Original Estimate 4h [ 14400 ]
Remaining Estimate 4h [ 14400 ]
Martin Sebor made changes - 25/Mar/08 05:27 PM
Resolution Won't Fix [ 2 ]
Status Open [ 1 ] Resolved [ 5 ]
Martin Sebor made changes - 07/Apr/08 12:13 AM
Time Spent 1h [ 3600 ]
Remaining Estimate 4h [ 14400 ] 3h [ 10800 ]