C Tutorial/math.h/logb
logb
Item Value Header file math.h Declaration float logbf(float num);double logb(double num);long double logbl(long double num); Return returns the exponent of num as a floating-point integer value.
#include <math.h>
#include <stdio.h>
int main(void)
{
double val = 1.0;
do {
printf("%f %f\n", val, logb(val));
val++;
} while (val<11.0);
return 0;
}