#include <math.h>float logbf(float num);double logb(double num); long double logbl(long double num);
logb( ), logbf( ), and logbl( ) functions were added by C99.
The logb( ) family of functions returns the exponent of num. This value is returned as a floating-point integer value. A domain error is possible when num is zero.
A related function is ilogb( ).