[Stdcxx Wiki] Update of FloatingPoint by MartinSebor
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: Added a heading and description. -- = WORK IN PROGRESS = + + = Floating Point Numbers, Infinities and NaNs = + + In preparation for resolving [http://issues.apache.org/jira/browse/STDCXX-51 STDCXX-51] this page details the platform-specific details describing infinities and NaNs produced as the result of certain floating point calculations, usually triggered by invalid operands. == libc symbols ==
[Stdcxx Wiki] Update of FloatingPoint by MartinSebor
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: Added/corrected HP-UX and other libc symbols. -- The table below lists the public symbols defined on each platform for Infinity, Quiet NaN, and Signaling NaN. tablestyle=background-color:cornsilk;text-align:center'''libc symbols'''|| - ||rowstyle=background-color:lightgray || AIX || HP-UX || IRIX || Linux || Solaris || Tru64 UNIX || Windows || + ||rowstyle=background-color:lightgray || AIX || HP-UX || IRIX || Linux || Solaris || Tru64 UNIX || Windows || - || header||`float.h`||`float.h`|| N/A ||`math.h` ||`sunmath.h`||`float.h` || || - ||(Infinity ||`FLT_INF`, `DBL_INF`, `LDBL_INF` || || N/A || `INFINITY` ||`infinity()` ||`FLT_INFINITY`, `DBL_INFINITY`, `LDBL_INFINITY` || N/A || + ||( header ||`float.h` ||`math.h`|| N/A ||`math.h`||`sunmath.h`||`float.h` + ||(Infinity ||`INFINITY`, `FLT_INF`, `DBL_INF`, `LDBL_INF`||`INFINITY`|| N/A||`INFINITY`||`INFINITY`, `infinity()`||`FLT_INFINITY`, `DBL_INFINITY`, `LDBL_INFINITY`|| N/A|| - ||(Quiet NaN ||`FLT_QNAN`, `DBL_QNAN`, `LDBL_QNAN`|| || N/A || `nan()` ||`quiet_nan(long)`||`FLT_QNAN`, `DBL_QNAN`, `LDBL_QNAN` || N/A || + ||(Quiet NaN||`FLT_QNAN`, `DBL_QNAN`, `LDBL_QNAN` ^2^||`nan(const char*)` ^1^|| N/A ||`nan(const char*)` ^1^||`quiet_nan(long)` ^2^ ||`FLT_QNAN`, `DBL_QNAN`, `LDBL_QNAN` || N/A || ||(Signaling NaN ||`FLT_SNAN`, `DBL_SNAN`, `LDBL_SNAN`|| || N/A || N/A||`signaling_nan(long)`||`FLT_SNAN`, `DBL_SNAN`, `LDBL_SNAN` || N/A || + ^1^ Supports all signatures required by C99 and POSIX: `float nanf(const char*)`, `double nan(const char*)`, and `long double nanl(const char*)`. + + ^2^ Recent versions also support the C99 interface. == printf() formatting ==
[Stdcxx Wiki] Update of FloatingPoint by MartinSebor
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_limitsdouble 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 = 0x8 SNAN: NaNS: signbit = 0 sign = 0, exponent = 0x7ff, fraction = 0x0005 HP-UX/IPF: INF: inf: signbit = 0 sign = 0, exponent = 0x7ff, fraction = 0 QNAN: nan: signbit = 0 sign = 0, exponent = 0x7ff, fraction = 0x4 SNAN: nan: signbit = 0 sign = 0, exponent = 0x7ff, fraction = 0x8 HP-UX/PA INF: inf: signbit = 0 sign = 0, exponent = 0x7ff, fraction = 0 QNAN: nan: signbit = 0 sign = 0, exponent = 0x7ff, fraction = 0x4 SNAN: nan: signbit = 0 sign = 0, exponent = 0x7ff, fraction = 0x8 Linux/x86_64 INF: inf: signbit = 0 sign = 0, exponent = 0x7ff, fraction = 0 QNAN: nan: signbit = 0 sign = 0, exponent = 0x7ff, fraction = 0x8 SNAN: nan: signbit = 0 sign = 0, exponent = 0x7ff, fraction = 0x4 Tru64 UNIX INF: INF: signbit = 0 sign = 0, exponent = 0, fraction = 0x7ff0 QNAN: NaNQ: signbit = 0x1 sign = 0, exponent = 0, fraction = 0xfff8 SNAN: NaNS: signbit = 0 sign = 0x1, exponent = 0x2aa, fraction = 0x7ff50005