#include <math.h>float log10f(float num);double log10(double num); long double log10l(long double num);
log10f( ) and log10l( ) were added by C99.
The log10( ) family of functions returns the base 10 logarithm for num. A domain error occurs if num is negative. If num is zero, a range error is possible.
Related functions are log( ) and log2( ).