stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Stdcxx Wiki] Update of "FloatingPoint" by MartinSebor
Date Tue, 03 Jun 2008 21:31:47 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Stdcxx Wiki" for change notification.

The following page has been changed by MartinSebor:
http://wiki.apache.org/stdcxx/FloatingPoint

The comment on the change is:
Started documenting platform-specific Infinity and NaN details.

New page:
= WORK IN PROGRESS =

== libc symbols ==

The table below lists the public symbols defined on each platform for Infinity, Quiet NaN,
and Signaling NaN.

||               || AIX       || HP-UX     || IRIX     || Linux      || Solaris          
   || Tru64 UNIX       || Windows ||
|| header        || <float.h> ||           ||          ||            ||            
         ||                  ||         ||
|| Infinity      ||`DBL_INF`  ||           || N/A      || `INFINITY` || `infinity()`     
   || `DBL_INFINITY`   ||         ||
|| Quiet NaN     ||`DBL_QNAN` ||           || N/A      || `nan("")`  || `quiet_nan(long)`
   || `DBL_QNAN`       ||         ||
|| Signaling NaN ||`DBL_SNAN` ||           || N/A      || N/A        || `signaling_nan(long)`||
`DBL_SNAN`       ||         ||


== printf() formatting ==

||               || AIX        || HP-UX    || IRIX          || Linux     || Solaris   || Tru64
     ||
|| Infinity      || `+/- INF`  || `+/- inf`|| `+/- inf`     || `+/- inf` || `+/- Inf` || `+/-
INF`  ||
|| Quiet NaN     || `+/- NaNQ` || `+/- nan`|| `+/- nan0xxx` || `+/- nan` || `+/- NaN` || 
   `NaNQ` ||
|| Signaling NaN || `+/- NaNS` || `+/- nan`|| `+/- nan0xxx` || `+/- nan` || `+/- NaN` || 
   `NaNS` ||


== numeric_limits<double> values/formatting ==

||                  || AIX         || HP-UX   || IRIX       || Linux  || Solaris/x86 || Tru64
  ||
||                  || XLC++ 9.0   || aCC 3,6 || MIPSpro    || gcc    || Sun C++     ||  HP
C++ ||
|| `infinity()`     || `INF`       || `inf`   || `inf`      || `inf`  || `Inf`       ||  0
     ||
|| `quiet_NaN()`    || `-NaNQ`     || `nan`   || `nan0xxx`  || `nan`  || `NaN`       ||  0
     ||
|| `signaling_NaN()`|| `-INF`      || `nan`   || `nan0xxx`  || `nan`  || `NaN`       ||  0
     ||


AIX/Power:
  INF: INF: signbit = 0
  sign = 0, exponent = 0x7ff, fraction = 0
  QNAN: NaNQ: signbit = 0
  sign = 0, exponent = 0x7ff, fraction = 0x80000
  SNAN: NaNS: signbit = 0
  sign = 0, exponent = 0x7ff, fraction = 0x5555555500055555

HP-UX/IPF:
  INF: inf: signbit = 0
  sign = 0, exponent = 0x7ff, fraction = 0
  QNAN: nan: signbit = 0
  sign = 0, exponent = 0x7ff, fraction = 0x40000
  SNAN: nan: signbit = 0
  sign = 0, exponent = 0x7ff, fraction = 0x80000

HP-UX/PA
  INF: inf: signbit = 0
  sign = 0, exponent = 0x7ff, fraction = 0
  QNAN: nan: signbit = 0
  sign = 0, exponent = 0x7ff, fraction = 0x40000
  SNAN: nan: signbit = 0
  sign = 0, exponent = 0x7ff, fraction = 0x80000

Linux/x86_64
  INF: inf: signbit = 0
  sign = 0, exponent = 0x7ff, fraction = 0
  QNAN: nan: signbit = 0
  sign = 0, exponent = 0x7ff, fraction = 0x80000
  SNAN: nan: signbit = 0
  sign = 0, exponent = 0x7ff, fraction = 0x40000

Tru64 UNIX
  INF: INF: signbit = 0
  sign = 0, exponent = 0, fraction = 0x7ff0000000000000
  QNAN: NaNQ: signbit = 0x1
  sign = 0, exponent = 0, fraction = 0xfff8000000000000
  SNAN: NaNS: signbit = 0
  sign = 0x1, exponent = 0x2aa, fraction = 0x7ff5555500055555

Mime
View raw message