Javatpoint Logo
Javatpoint Logo

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()



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


Let's see the simple example


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

Next TopicC++ Math Functions

Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials

B.Tech / MCA