You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@stdcxx.apache.org by "Martin Sebor (JIRA)" <ji...@apache.org> on 2008/02/01 05:31:08 UTC

[jira] Updated: (STDCXX-464) [HP-UX 11.23] std::num_put drops sign from negative long double NaN

     [ https://issues.apache.org/jira/browse/STDCXX-464?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Sebor updated STDCXX-464:
--------------------------------

              Severity: Incorrect Behavior
           Description: 
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}

  was:
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)


    Remaining Estimate: 4h
     Original Estimate: 4h

Fixed formatting in Description.
Set Original Estimate and Severity.

> [HP-UX 11.23] std::num_put drops sign from negative long double NaN
> -------------------------------------------------------------------
>
>                 Key: STDCXX-464
>                 URL: https://issues.apache.org/jira/browse/STDCXX-464
>             Project: C++ Standard Library
>          Issue Type: Bug
>          Components: 22. Localization
>    Affects Versions: 4.1.3, 4.2.0
>         Environment: HP-UX 11.23 and prior
>            Reporter: Martin Sebor
>            Assignee: Martin Sebor
>            Priority: Minor
>             Fix For: 4.2.1
>
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> 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}

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