ilogbd64.3m (2010 09)

i
ilogbd64(3M) ilogbd64(3M)
(HP Integrity Server Only)
NAME
ilogbd64(), ilogbd128(), ilogbd32() - decimal exponent functions
SYNOPSIS
#define __STDC_WANT_DEC_FP__
#include <math.h>
int ilogbd64(_Decimal64 x);
int ilogbd128(_Decimal128 x);
int ilogbd32(_Decimal32 x);
DESCRIPTION
The ilogbd64() function computes the exponent of the floating point value x. Formally, the return
value is the integral part of log base 10 of |x| as a signed integer value, for nonzero x.
If x is subnormal, it is treated as though it were normalized, before the exponent is determined.
ilogbd64(x) is equivalent to (int)logbd64(
x) for all values of x except NaN, ±infinity, and zero.
ilogbd128() is a _Decimal128 version of ilogbd64(); it takes a
_Decimal128 argument.
ilogbd32() is a _Decimal32 version of ilogbd64(); it takes a _Decimal32 argument.
These math functions are supported for HP-UX 11i Version 3 September 2008 Update and forward.
USAGE
To use any of these functions, compile with the
+decfp option.
Make sure your program defines
__STDC_WANT_DEC_FP__
and then includes <math.h>.
Link in the math library by specifying
-lm or -l:libm.a on the linking command line.
For more information, see the HP-UX floating-point guide for HP Integrity servers at the following site:
http://www.hp.com/go/fp
.
RETURN VALUE
If x is ±infinity,
ilogbd64() returns INT_MAX and raises the invalid floating-point exception.
If x is zero,
ilogbd64() returns FP_ILOGB0 and raises the invalid floating-point exception.
If x is NaN,
ilogbd64() returns FP_ILOGBNAN and raises the invalid floating-point exception.
ERRORS
If x is NaN,
ilogbd64() sets errno to [EDOM].
If x is zero or infinite,
ilogbd64() sets errno to [ERANGE].
SEE ALSO
frexpd64(3M), logbd64(3M), scalbnd64(3M), scalblnd64(3M), math(5).
STANDARDS CONFORMANCE
These functions conform to ISO/IEC TR 24732, "Extension for the programming language C to support
decimal floating-point arithmetic".
HP-UX 11i Version 3: September 2010 1 Hewlett-Packard Company 1

Summary of content (2 pages)