ilogb(), ilogbf()

compute integral exponent of number 

Function


SYNOPSIS

#include <math.h>

int ilogb(double x)

int ilogbf(float 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).

The ilogbf() function is a single-precision version of ilogb().


PARAMETERS

x 

Is the number whose exponent is to be returned.


RETURN VALUES

On success, ilogb() returns the exponent part of x. If x is 0, then ilogb() returns -INT_MAX. If x is NaN, +Infinity, or -Infinity, ilogb() returns INT_MAX.


CONFORMANCE

UNIX 98


MULTITHREAD SAFETY LEVEL

MT-Safe.


PORTING ISSUES

None.


AVAILABILITY

PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Functions:
logb(), math()


PTC MKS Toolkit 10.4 Documentation Build 39.