The Single UNIX ® Specification, Version 2
Copyright © 1997 The Open Group

 NAME

ilogb - return an unbiased exponent

 SYNOPSIS



#include <math.h>

int ilogb (double x)

 DESCRIPTION

The ilogb() function returns the exponent part of x. Formally, the return value is the integral part of logr|x| as a signed integral value, for non-zero x, where r is the radix of the machine's floating point arithmetic.

The call ilogb(x) is equivalent to (int)logb(x).

 RETURN VALUE

Upon successful completion, ilogb() returns the exponent part of x.

If x is 0, then ilogb() returns -INT_MIN. If x is NaN or ±Inf, then ilogb() returns INT_MAX.

 ERRORS

No errors are defined.

 EXAMPLES

None.

 APPLICATION USAGE

None.

 FUTURE DIRECTIONS

None.

 SEE ALSO

logb(), <math.h>.

UNIX ® is a registered Trademark of The Open Group.
Copyright © 1997 The Open Group
[ Main Index | XSH | XCU | XBD | XCURSES | XNS ]