Home » C++ Math ilogb() Function

C++ Math ilogb() Function

by Online Tutorials Library

C++ Math ilogb()

The function returns the exponent part of a given number i.e integral part of logx.

ilogb() function is equivalent to (int)logb()

Syntax

Parameter

x: It is the value whose exponent is to be calculated.

Return value

Parameter Return value
x=0 -INT_MIN
x=NAN or +inf or _inf INT_MAX

Example

Let’s see the simple example

Output:

Value of x is : 4  Exponent value of x is : 2  

Next TopicC++ Math Functions

You may also like