incubator-stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Sebor (JIRA)" <j...@apache.org>
Subject [jira] Created: (STDCXX-51) infinity, NaN formatted differently on different platforms
Date Fri, 14 Oct 2005 22:50:45 GMT
infinity, NaN formatted differently on different platforms
----------------------------------------------------------

         Key: STDCXX-51
         URL: http://issues.apache.org/jira/browse/STDCXX-51
     Project: STDCXX
        Type: Improvement
  Components: 22. Localization  
    Versions: 4.1.2    
 Environment: all
    Reporter: Martin Sebor
    Priority: Minor


The output of the program below is different depending on the operating system it runs on.
It should be the same (preferably like that on AIX).

$ cat u.cpp && uname -sr && make u -r && ./u
#include <iostream>
#include <limits>

int main ()
{
    std::cout << std::numeric_limits<double>::infinity () << '\n'
              << std::numeric_limits<double>::quiet_NaN () << '\n'
              << std::numeric_limits<double>::signaling_NaN () << '\n';

}
SunOS 5.9
gcc -c -I/build/sebor/dev/stdlib/include/ansi -D_RWSTDDEBUG   -pthreads -D_RWSTD_USE_CONFIG
-I/build/sebor/gcc-3.4.3-15s/include -I/build/sebor/dev/stdlib/include -I/build/sebor/dev/stdlib/examples/include
 -pedantic -nostdinc++ -g  -Wall -W -Wcast-qual -Winline -Wshadow -Wwrite-strings -Wno-long-long
 u.cpp
gcc u.o -o u -pthreads -L/build/sebor/gcc-3.4.3-15s/lib -lstd15s  -lsupc++ -lm
rm u.o
inf
nan
nan

$ uname -vs && gmake u -r && ./u
AIX 5
xlCcore_r -c -I/build/sebor/dev/stdlib/include/ansi -D_RWSTDDEBUG    -D_RWSTD_USE_CONFIG -I/build/sebor/vacpp-7.0.0.3-15D/include
-I/build/sebor/dev/stdlib/include -I/build/sebor/dev/stdlib/examples/include  -g  -q64  -qtemplateregistry=u.ti
  u.cpp
xlCcore_r u.o -o u -I/build/sebor/dev/stdlib/include/ansi -D_RWSTDDEBUG    -D_RWSTD_USE_CONFIG
-liconv -brtl   -q64 -I/build/sebor/dev/stdlib/include/ansi -D_RWSTDDEBUG    -D_RWSTD_USE_CONFIG
-I/build/sebor/vacpp-7.0.0.3-15D/include -I/build/sebor/dev/stdlib/include -I/build/sebor/dev/stdlib/examples/include
 -qtemplateregistry=u.ti -L/build/sebor/vacpp-7.0.0.3-15D/lib -lstd15D   -lm
rm u.o
inf
nanq
nans


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message